I'm using an macro in SGPLOT to create graphs (code attached) and I want to specify the minimum and maximum values of the y axis.
Data for the graphs comes from the data set macrovar, which includes the variables Ymin, Ymax, and Yint.
When the graphs are created, they have the interval that I have specified with Yint, but the maximum value for the Yaxis is not what I have specified with the Ymax variable.
In the attached example graph, the maximum is just a little bit above 85. However, I have specified that the max for the Y axis needs to be 93.5. Why is it not using the values I have specified for Ymax? Any help figuring this out would be greatly appreciated!
Fastb,
Hypothesis to verify!
1)Was there an interaction between your title defined with a title area with move(14,-10) ?
2)what happens if you change into ods graphics /height=20 cm;
3) an effect of offsets ?
Andre
I believe you are using the right (VALUES) option. You could additionally try the MIN and MAX options on the Y axis. Hard to say without the data and with the macro variables.
If you add the VALUESHINT option, I believe you will get what you want. By default, the axis will be constrained by the min/max values in the VALUES option. However, if you also specify VALUESHINT, the axis will not be constrained, and the tick values from the VALUES option that fall within the axis range will be drawn.
Hope this helps!
Dan
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.