diff --git a/examples/svg/nmos_out_BSIM330_svg.sp b/examples/svg/nmos_out_BSIM330_svg.sp index 12036a3a7..a4b5da9a3 100644 --- a/examples/svg/nmos_out_BSIM330_svg.sp +++ b/examples/svg/nmos_out_BSIM330_svg.sp @@ -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' diff --git a/src/frontend/svg.c b/src/frontend/svg.c index 74673bc27..9df9e0284 100644 --- a/src/frontend/svg.c +++ b/src/frontend/svg.c @@ -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))