BookmarkSubscribeRSS Feed
0 Likes

PROC SGPANEL is a module with deficits. First, the user cannot specify the number of graphs in each row. Second, the graphs are automatically left-justified, with no way to correct them in the module.

It is therefore especially embarrassing when I am putting five graphs in one panel. PROC SGPANEL automatically assigns three graphs in the first row and two in the second. I cannot change the arrangement into two in the first and three in the second row.

What is more embarrassing is that the graphs in the second panel are automatically left-justified and there is no way I can tell SAS to change the alignment the graphs in the second row to middle-justified in PROC SGPANEL. What is more, PROC SGPANEL seems to be the only module capable of putting multiple graphs in one panel when there is no way of drawing them in statistical analytic modules.

In fact, I am drawing calibration plots of logistic regression models. With an older SAS version (TS1M5), I cannot do this in PROC LOGISTIC, so PROC SGPLOT and PROC SGPANEL are the only two modules I can resort to. But PROC SGPLOT does not support putting graphs in panels while PROC SGPANEL does not support the functions I mentioned above. It is really frustrating.

6 Comments
Quentin
Super User

I think the idea of SGPANEL is to have the graphs in columns and rows, with shared axes, for easy comparisons.  I don't think having rows aligned differently would make sense in that context.  It sounds like you are trying to control the position of each graph on the page.  I wonder if instead of using SGPANEL, you would be better of with SGPLOT, and see if you can use ODS LAYOUT to customize the position for each graph in a way that you like.  You might also look into whether writing GTL with PROC TEMPLATE would give you ore control over graph positions.

Season
Pyrite | Level 9
 Thanks for your reply. I don't think merely having the graphs in columns and rows with shared axes for easy comparisons is suffice. It is often required by journals that the graphs be arranged in panels when there are multiple graphs. In situations like these, the only PROC I can resort to is PROC SGPANEL. However, in my humble opinion, a graph with two panels left-justified in the second row is ugly when there are already three in the first row. It should therefore never be used for formal presentation.
You mentioned PROC SGPLOT, but unfortunately PROC SGPLOT does not support putting multiple graphs in panels. I had tried it before.
You mentioned ODS LAYOUT. I will try that option to see if it works.
 
 
 
 
 
 
 
Finally, you mentioned GTL. This relates to another reason why I posted my complaints online. I think GTL is too difficult to learn. Assigning the number of graphs and the justification in each row is not a complicated and advanced request. I think the users should be granted more flexibility and freedom to draw their own plots in an easy manner.
 
 
 
ballardw
Super User

Personally your comment about "h two panels left-justified in the second row is ugly when there are already three in the first row." is very much an opinion that I doubt has widespread following. Especially if the horizontal axis in column is common. It makes much more sense in terms of comparing similar items if common axis are aligned.

 

As far as GTL: Have you see this example? https://support.sas.com/kb/39/100.html

 

You can also, if you have SAS GRAPH (the ancient Proc Gplot/Gchart/G3d) with the Greplay procedure and a custom template (that isn't that hard to make) can provide up to 99 (IIRC) "graph" areas on a "panel" . See some basic examples here: https://support.sas.com/sassamples/graphgallery/PROC_GREPLAY.html

There are serious considerations about font sizes because you create individual graphs and then play them back into the "panels" and if aspect is different then the font aspect(s) get changed.

 

 

Season
Pyrite | Level 9

@ballardw Thanks for your reply. I admit that my judgement concerning whether the ugliness of left justification is my own opinion. But I have cited circumstances where my concern applies to. If I am presenting five calibration plots to an editor of medical profession, his/her top concern may not be the justification of the axes. Instead, he/she may demand me that I put my graphs in a nicer position. In this case, I must follow his/her order, for he/she is the editor and I am not. I don't think such circumstances are rare.

In addition, the user can specify options in PROC SGPANEL to make sure that the axes are of the same starting and ending values. So specifying the justification does not equal to misinterpretation of results, which is at least part of the concern of justifying the axes.

Thanks for sharing the link regarding GTL. But don't you think the formidably lengthy codes are inferior to simply adding options in the original PROC? Why bother learning and typing that much, since what I request is not complicated at all? The users should be granted more freedom to choose the format of displaying their graphs in an easy manner. This is my concern. I think my concern is neither complicated nor advanced to that extent that GTL has to be applied to solve the problem, which is, unfortunately, the case right now. It's OK if you think left-justifying all the graphs is appropriate, but the users should be given a second choice in an easy way.

Regarding the SAS GRAPH modules, thank you for reminding me of their presence. I had simply forgotten all about them when I was plotting them, for when I compared a scatterplot drawn with both PROC GPLOT and PROC SGPLOT, the "ancient" feel of the plots generated by PROC GPLOT halted my further exploration into this ancient module and any module of this sort.

PaigeMiller
Diamond | Level 26

@Season wrote:

PROC SGPANEL is a module with deficits. First, the user cannot specify the number of graphs in each row. Second, the graphs are automatically left-justified, with no way to correct them in the module.

It is therefore especially embarrassing when I am putting five graphs in one panel. PROC SGPANEL automatically assigns three graphs in the first row and two in the second. I cannot change the arrangement into two in the first and three in the second row.

What is more embarrassing is that the graphs in the second panel are automatically left-justified and there is no way I can tell SAS to change the alignment the graphs in the second row to middle-justified in PROC SGPANEL. What is more, PROC SGPANEL seems to be the only module capable of putting multiple graphs in one panel when there is no way of drawing them in statistical analytic modules.

In fact, I am drawing calibration plots of logistic regression models. With an older SAS version (TS1M5), I cannot do this in PROC LOGISTIC, so PROC SGPLOT and PROC SGPANEL are the only two modules I can resort to. But PROC SGPLOT does not support putting graphs in panels while PROC SGPANEL does not support the functions I mentioned above. It is really frustrating.


You might want to search the forums and search the internet before you say it can't be done, or even ask first. In particular, look at ODS LAYOUT GRIDDED.