BookmarkSubscribeRSS Feed
Quartz | Level 8

I'm running 9.3

My ODS PDF gbarline chart is stretching the symbol so that a dot becomes a large elipse.   The thing is, this is happening inconsistently as charts further within my program are appearing with the symbols shaped as expected.  I'm struggling to identify & debug the culprit, suggestions please?

Apologies - I can't replicate the issue with a demonstration program and I can't use my production data/chart in this forum.


ods graphics on ;

goptions device= jpeg  border  ;

goptions htext=4 ftext="arial";

* Bar legend ;

legend1 position=(middle left outside)  origin=(,4.8)cm across=1 shape=bar(0.15,0.15)cm

        label=(position=(top )  j=l "VOLUME");

* Line plot legend ;

legend2 position=(middle left outside) origin=(,1.8)cm across=1 repeat=2

        label=(position=(top) j=l  "VALUE") value=(height=3) ;

axis1   value=(height=2.8) order=(&bar_order.) label=none;

axis3 label=none ;

symbol1 value=dot c=black  h=4;

symbol2 value=star c=black  h=4;

symbol3 value=square c=black  h=4;

symbol4 value=diamond c=black  h=4;

pattern1 c=biyg;

pattern2 c=bio;


  ods region width=10cm height=2cm x=1.2cm y=8cm;

  ods text = "^{style[font_face='calibri' fontsize=2.5 just=left fontweight=bold]  demotext}";

ods region width=18cm height=7cm x=1.35cm y=8.5cm;

proc gbarline data=work.a_dataset;

  title ' ' ;

  format   vol  val  percent8.0 ;

  bar MONTH / discrete sumvar=VOLUME subgroup=PRODUCT legend=legend1 axis=axis3 maxis=axis1 clipref autoref missing ;

  plot / sumvar=Share_PRODUCT legend=legend2  axis=axis3 ;

  plot / sumvar=Share_SUB_PROD;


Super User

Mixing traditional SAS graphics procedures such as GChart, GPlot and GBarline and ODS graphics, SGPlot, SGPanel or SGRender, might be part of the cause as the options controlling generated graphs size may mean that the options you think are in effect for a portion of your program may not be.

For instance to control the size of a chart generated by GBarline you may need to set Goptions of Hsize and Vsize to your expected display size. You could get distortion if the graph is generated in one aspect ration (vertical to horizontal) due to goption defaults and then displayed in your document with a different ratio due to trying to display within a specific region.

Meteorite | Level 14

Goptions do not impact SG procedures.  ODS Graphics has no impact on SAS/GRAPH procedures.  While there is a ODS REGION statement, I did not see any SG procedures in the code.

In general, the SG procedures will do a better job of maintaining the aspect of the graphs for the region sizes.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3 in conversation