variables like color1 may override thie svg_intopts and svg_stropts.

Unsetting the variables will reset to the default.
Malloced colors and cfg.strings will be freed again.
Examples do show more of the options.
This commit is contained in:
Holger Vogt
2021-03-19 15:06:35 +01:00
parent 4b6aa6df6e
commit 02b4f06f2d
3 changed files with 60 additions and 38 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ set nolegend
* the default settings
* "svgwidth", "svgheight", "svgfont-size", "svgfont-width", "svguse-color", "svgstroke-width", "svggrid-width",
set svg_intopts = ( 512 384 20 0 1 5 2 )
set svg_intopts = ( 512 384 16 8 1 5 2 )
* "svgbackground", "svgfont-family", "svgfont"
setcs svg_stropts = ( yellow Arial Arial )
@@ -42,7 +42,7 @@ set nounits
hardcopy plot_10.svg vss#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage / V' ylabel 'Drain current / µA'
unset svg_intopts
set svg_intopts = ( 512 384 16 0 1 5 2 )
set svg_intopts = ( 512 384 6 0 1 5 2 )
hardcopy plot_11.svg vss#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage / V' ylabel 'Drain current / µA'
+13 -3
View File
@@ -30,7 +30,7 @@ set nolegend
* the default settings
* "svgwidth", "svgheight", "svgfont-size", "svgfont-width", "svguse-color", "svgstroke-width", "svggrid-width",
set svg_intopts = ( 512 384 20 0 1 2 0 )
set svg_intopts = ( 512 384 16 0 1 2 0 )
* "svgbackground", "svgfont-family", "svgfont"
setcs svg_stropts = ( blue Arial Arial )
@@ -44,25 +44,33 @@ set color1=blue
set color2=green
hardcopy plot_1.svg vss#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage' ylabel 'Drain current'
set svg_intopts = ( 512, 384, 16, 0, 1, 2, 0 )
set svg_intopts = ( 512, 384, 14, 0, 1, 2, 0 )
set color0=blue
set color1=white
set color2=red
hardcopy plot_2.svg vss#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage' ylabel 'Drain current'
set svg_intopts = ( 512, 384, 16, 0, 0, 2, 2 )
set svg_intopts = ( 512, 384, 12, 0, 0, 2, 2 )
set color0=black
set color1=yellow
set color2=white
hardcopy plot_3.svg vss#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage' ylabel 'Drain current'
* reset the colors
set svg_intopts = ( 512, 384, 12, 0, 1, 2, 2 )
unset color0
unset color1
unset color2
hardcopy plot_4.svg vss#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage' ylabel 'Drain current'
* choose backgroundfrom color list
set color0="#F0E68C"
set color1="#DDA0DD"
set color2"#EE82EE"
hardcopy plot_5.svg vss#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage' ylabel 'Drain current'
* for MS Windows only
if $oscompiled = 1 | $oscompiled = 8
@@ -71,6 +79,7 @@ if $oscompiled = 1 | $oscompiled = 8
shell Start plot_2.svg
shell Start plot_3.svg
shell Start plot_4.svg
shell Start plot_5.svg
else
* for CYGWIN, Linux
shell feh --magick-timeout 1 plot_0.svg &
@@ -78,6 +87,7 @@ else
shell feh --magick-timeout 1 plot_2.svg &
shell feh --magick-timeout 1 plot_3.svg &
shell feh --magick-timeout 1 plot_4.svg &
shell feh --magick-timeout 1 plot_5.svg &
end
.endc