BookmarkSubscribeRSS Feed
Jennys
Calcite | Level 5
Hi all

Is it possible to use proc greplay with graphs created with ods graphics? The graphs created by ods graphics is png format, and I can´t figure out how to refter to them in my proc greplay.

Tks for advice
Best regards
Jenny
9 REPLIES 9
Cynthia_sas
SAS Super FREQ
Hi,
ODS Graphics cannot be used with Proc Greplay because it does not create a gseg catalog entry. So you may have to investigate Proc Sgplot and Proc Sgpanel, instead of greplay.
Cynthia
Jennys
Calcite | Level 5
Thanks for the hint. I´ll do that


Jenny
Cynthia_sas
SAS Super FREQ
Hi:
I was away from my computer when I did my first post. Here are a couple of SGPANEL examples to get you started. And some links to the documentation and some papers to investigate:
http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/sgpanel-ov.htm
http://support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/sgplot-ov.htm
http://support.sas.com/resources/papers/proceedings09/158-2009.pdf
http://support.sas.com/resources/papers/proceedings09/174-2009.pdf
http://www2.sas.com/proceedings/forum2008/255-2008.pdf
http://www2.sas.com/proceedings/forum2007/193-2007.pdf
http://support.sas.com/resources/papers/proceedings09/324-2009.pdf


cynthia
[pre]
ods listing close;
ods html path='.' (url=none)
gpath='.' (url=none)
file='panel_loess.html'
style=ocean;

proc sgpanel data=sashelp.heart;
title '1) SGPANEL and LOESS statement';
panelby sex;
loess x=ageatdeath y=agechddiag /
clm alpha=.1;
run;
ods html close;


ods html path='.' (url=none)
gpath='.' (url=none)
file='panel_hbox.html'
style=ocean;

proc sgpanel data=sashelp.heart;
title '2) SGPANEL and HBOX statement';
panelby sex;
hbox ageatdeath / category=chol_status;
run;
ods html close;
[/pre]
DanH_sas
SAS Super FREQ
If you want to put together heterogenous graphs (e.g. a bar chart and a box plot), I discuss a technique for doing this at the end of my "Secrets of the SGProcedures" paper (http://support.sas.com/resources/papers/proceedings09/324-2009.pdf). Take a look at that infomation and see if it helps.
Jennys
Calcite | Level 5
I want to put together two boxplots in one panel. I tried with the transparency, and got an error: ERROR: Box plots may not be overlaid.

ods html path='.' (url=none)
gpath='.' (url=none)
file='boxes.html'
style=ocean;
proc sgplot data=sashelp.class
tmplout="temp2.sas";
vbox height / category=age;
vbox weight / category=age transparency=0.3;
run;
ods html close;
DanH_sas
SAS Super FREQ
The SG procedures currently do not allow boxplot overlays; however, you can do this in gtl. Run this programs and see if this is what you want:

proc template;
define statgraph boxplot;
begingraph;
layout overlay / cycleattrs=true;
BoxPlot X=Age Y=Height / LegendLabel="Height" datatransparency=0.5 name="a";
BoxPlot X=Age Y=Weight / LegendLabel="Weight" datatransparency=0.5 name="b";
discretelegend "a" "b";
endlayout;
endgraph;
end;
run;

proc sgrender data=sashelp.class template=boxplot; run;
Jennys
Calcite | Level 5
This is perfect, I added the orient=horizontal, so now I am very satisfied.

Do you know if it´s possible to control the position of the boxes, so that they don´t overlap. Here is one example of the graph I am thinking of:
http://www.stata.com/support/faqs/graphics/gph/graphdocs/box5.html

Thank you very much.

Best regards
Jenny Message was edited by: Jennys
everglades
Calcite | Level 5
Can I use the proc template in SAS 9.2 TS level1M0. Thanks
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
To the OP: yours is a new query, suggest you not piggy-back on a query that was authored by someone else -- consider though adding a link in your forum post as an alternative to highlight relative content.

Also, your choice of forum is something else to consider next time - SAS/Graph has its own forum.

Scott Barry
SBBWorks, Inc.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 2151 views
  • 0 likes
  • 5 in conversation