I'm using the proc sgplot and trying to control de width of the label (as you can see in the image).
How can I change the width of the xaxis ?
graphics on / height=3in width=10.5in noborder;
proc sgplot data=tmpgrafico;
vbar Teste / response=Volume legendlabel="Volume" barwidth=0.7;
vbar Teste / response=Volume_Dt legendlabel="Volume_Dt" barwidth=0.4;
tk's in advantage....
FITPOLICY is in 9.2.3 as well. Other options you might try are STAGGER, STAGGERROTATE, STAGGERTHIN, ROTATETHIN
The format associated with the X axis variable controls what is attempted to display. You might try adding Format teste ddmmyyn4. ;
which should have fewer characters but shouldn't show year values so may be problematic for some uses.
As far as I know (up to version 9.3 anyway) you cannot rotate to 90 degrees in SG graphics. You can however in SAS/GRAPH graphics, if you define an axis with the VALUE option and the ANGLE suboption. I find it very awkward to use.
What you might also try in SG graphics is to increase the image resolution with option IMAGE_DPI=300 on your ODS LISTING or ODS HTML statement. This has for side effect to decrease the size of all text strings on the graph. - PG
Not sure what you mean by "Change the width of this label". If you want to change the font size of the tick values, you can do that using valueattrs. Vertical tick values are supported at SAS 9.4 in GTL (see example below). In your case, with so many tick values, you could try two other possibilities.
- Use a horizontal bar chart, so the date values are on the Y axis.
- If this is really a time axis, use a time axis with needle plots.
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.
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.