04-12-2017 12:49 PM - edited 04-12-2017 12:49 PM
I need to display 200+ distinct subjects on yaxis but my graph is cutting. Is there a way to either display all the subejcts in one plot or maybe split the graph to display say 50 subjects per graph? I am using SAS 9.2
04-12-2017 04:46 PM
As a minimum show all of the graphics options, statements (axis symbol pattern) and the gplot code used. Some actual example data to illustrate what you have would also help.
Also when you say "page" do mean something like an RTF or PDF page? What size page if so.
Somewhat generic options could be:
Increase the size of the plot area with goptions hsize and vsize options, reduce the size of the markers shown (symbol)
To create separate charts with fewer subjects easiest would be to add a variable to indicate a display group assignment, sort the data by that variable and then use a BY statement in Proc Gplot using the variable.
04-12-2017 05:06 PM
04-13-2017 11:27 AM
Thanks for the reply.
By "page" I mean separate PDF page.
I am not sure if I can share my data in this forum.
##- Please type your reply above this line. Simple formatting, no
Any example data that shows the same behavior.
But as a minimum show the code, graphics options, axis and symbols statements you are using.
By Group processing should create a separate graph per group which I would expect to appear on separate pages if the size of the graph is at least half the vertical size of your pdf page.
04-20-2017 01:45 PM
Below is the graphic and symbol options, hope this will help
goptions YMAX=1500 in vsize=1000 in hsize=1000 in;
/*vertical axis option*/
axis3 label = (a=90 f=arial h=3 " Subject")
length = 100
style = 1
width = 5
color = black
offset = (0 cm, 0 cm)
order = 0 to %eval(&NSub+1)
major = (h=0.75 w=6) minor=(h=0.5 n=6)
value = (%do i=1 %to &NSub;
tick=1 h=1 ' '
tick=%eval(&i+1) h=1 "&&N&i" /* N is the maco variable that contains the subject number */
tick=%eval(&NSub+1) h=1 ' ');
goptions display hby=2 fby=arial;
symbol1 w=0.5 h=0.5 v=dot c=black ;
symbol2 w=0.5 h=0.5 v=dot c=red ;
symbol3 w=0.5 h=0.5 v=dot c=blue ;
symbol4 w=0.5 h=0.5 v=dot c=green ;