hcopywidth and hcopyheight failed with SVG plot
cp_getvar read CP_NUM, not CP_STRING Patch #108 contributed by Giles Atkinson Add hcopywidth and hcopyheight to example nmos_out_BSIM330_svg.sp
This commit is contained in:
parent
b749e62e31
commit
a68cfefb28
|
|
@ -60,6 +60,7 @@ hardcopy plot_3.svg vss#branch title 'Drain current versus drain voltage' xlabel
|
|||
|
||||
* reset the colors
|
||||
set svg_intopts = ( 512, 384, 12, 0, 1, 2, 2 )
|
||||
|
||||
unset color0
|
||||
unset color1
|
||||
unset color2
|
||||
|
|
@ -69,6 +70,9 @@ hardcopy plot_4.svg vss#branch title 'Drain current versus drain voltage' xlabel
|
|||
set color0="#F0E68C"
|
||||
set color1="#DDA0DD"
|
||||
set color2"#EE82EE"
|
||||
* set width and hight
|
||||
set hcopywidth=1024
|
||||
set hcopyheight=768
|
||||
hardcopy plot_5.svg vss#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage' ylabel 'Drain current'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -154,18 +154,10 @@ SVG_Init(void)
|
|||
}
|
||||
|
||||
/* plot size */
|
||||
if (!cp_getvar("hcopywidth", CP_STRING, &Cfg.ints[SVG_WIDTH], sizeof(Cfg.ints[SVG_WIDTH]))) {
|
||||
dispdev->width = Cfg.ints[SVG_WIDTH];
|
||||
}
|
||||
else {
|
||||
dispdev->width = SVGwidth;
|
||||
}
|
||||
if (!cp_getvar("hcopyheight", CP_STRING, &Cfg.ints[SVG_HEIGHT], sizeof(Cfg.ints[SVG_HEIGHT]))) {
|
||||
dispdev->height = Cfg.ints[SVG_HEIGHT];
|
||||
}
|
||||
else {
|
||||
dispdev->height = SVGheight;
|
||||
}
|
||||
cp_getvar("hcopywidth", CP_NUM, &SVGwidth, 0);
|
||||
dispdev->width = SVGwidth;
|
||||
cp_getvar("hcopyheight", CP_NUM, &SVGheight, 0);
|
||||
dispdev->height = SVGheight;
|
||||
|
||||
/* get linewidth information from spinit */
|
||||
if (!cp_getvar("xbrushwidth", CP_NUM, &Cfg.ints[SVG_STROKE_WIDTH], 0))
|
||||
|
|
|
|||
Loading…
Reference in New Issue