08-17-2016 01:29 PM
I am creating a plot where the y-axis is log axis. I am using SAS 9.4 M2.
The plot which is getting produced has 1E1, 1E2, 1E3, etc as labels.
Can this be changed ? I would like to have labels like 0, 10, 100, 1000, 10000,etc
Here is the sample code :
proc sgplot data = lb;
series x = weeks y = lbstresn / group = subjid groupms=subjid markers;
yaxis label = "Genomes" type = log logstyle = logexpand logvtype = exponent display = all min = 1 max = 10;
xaxis values= (0 to 20 by 1 ) label = "Weeks" ;
08-17-2016 02:36 PM
Did you notice that you will get integers if MAX=5, but you get scientific notation if MAX=6 or more?
I don't know how to do what you want in SAS 9.4m2. In SAS 9.4m3 you can use the VALUESFORMAT= option to assign the format for the YAXIS. The default format is BEST6., which is why you are getting integers if MAX<=5, but you get scientific notation if MAX>=6.
08-17-2016 04:17 PM
Same answer: You can use the TICKVALUEFORMAT= suboption on the YAXISOPTS= option, but that is a 9.4m3 feature.
For some data you could work around the problem by rescaling your Y variable. For example, if the Y axis shows a measurement in centimeters, you can divide the number by 1E5 and display the data as measured in meters. I don't know what your Y variable represents, but if you can divide it by 1E5 or 1E6, then you can get the integer units you want.