I used sgplot to plot a series gaph but I want to adjust the x and y axis scale a bit. the scale of the yaxis begins a little bit higher as 0 while the x axis begins exactl y at 0. I want both to start from 0 . Is there any way to do that?
Yes, you would use an xaxis or yaxis with the specific options:
http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#xaxis-stmt.htm
Probably min/max or values in your case. AS I have no example I can't be specific, but something like
xaxis values=(0 1 2 3 4);
Will put ticks at 0 1 2 3 4
Some plot statements request an axes ranges of only the data range of the variables, such as Scatter or Series. So, if the y-axis variable data is from 100-200, the y-axis range will show around 100-200. You can change that by setting options on the axis. Other plot statements always include zero in the response axis range, such as the bar chart. If there a mixture of plot types, the union of the data requested by the plots is used.
If you do not need to control each tick value, you can just set the MIN or MAX values:
yaxis min=0;
Thanks to you all. I tried using min=0 but it didn't work. I wanted the scale this way:
From the graph snippet you posted, it appears that you have a line going below 0, which would account for the 0 tick location. Can you confirm this?
Ahh - I think you're wanting to get rid of the 'offset' (the space along the axis before zero).
xaxis offsetmin=0;
yaxis offsetmin=0;
Yes DanH_sas, this is true but I don't want it this way how can I correct that so that I get something like in graph one?
I still have another question concerning the line and grid thickness. It seems the graph (which is the second pic) is very thin.
Is there any way to make these thicker, so that it looks like the first graph.
Also is there any way to compress the height of the graph to look like the first graph?
Can one add special fonts which are not available in sas graph to graph options if this is installed on my pc?
I will be grateful for any help
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.