BookmarkSubscribeRSS Feed
Ken_oy
Fluorite | Level 6
By using "plot=roc (id=prob)" option, i can create figure1, but this is jpg format graph. I need a png or tiff format for my paper.
Photobucket
FIGURE1


I try to use proc gplot to do this, and created two graphs, fig2 and fig3.
My questions,
1. how can i merge two graphs in to one (make it the same as fig1).
2. Or any way to create tiff png graphs from proc logistic directly?

Thanks!!

Photobucket
Figure2

Photobucket
Figure3
7 REPLIES 7
GraphGuy
Meteorite | Level 14
gplot has an 'overlay' option, which you could use something like ...

plot y1*x y2*x / overlay
Ken_oy
Fluorite | Level 6
Thanks for your advice! It works for me.

But if i can use figure two as a template, and then plot figure 3 on figure 2, then things will be more easier. Is there any way to do this? I know in "R" we can, but in "sas" i have no idea.

Anyway, you help me a lot! Thanks again!!
:D
DanH_sas
SAS Super FREQ
Hey Ken,

Your ROC curve output appears to be using ODS Graphics. If it is, you can use the IMAGEFMT option on the ODS GRAPHICS statement to set the image type to PNG:

ods graphics on / imagefmt=png;



ods graphics off;

Let me know if that works for you.

Thanks!
Dan
Ken_oy
Fluorite | Level 6
awesome!!
Thanks, this works! I can have it in png or tiff easily, now!
Ken_oy
Fluorite | Level 6
Hi Dan, this is the code i am using. How can I remove the grid in figure 1?
i.e. Any place I can put a nogrid option? or something else?
Thanks!

---------------------------------------------------------
ods graphics on / imagefmt=tiff;
proc logistic data=ffinal plots=roc (id=prob);
model dead(event='1')= age power factor area/nofit;
roc 'All' age power factor area;
run;
ods graphics off;
DanH_sas
SAS Super FREQ
There are a couple of ways to do this. One involves editing the graph template used to create the graph in LOGISTIC. However, based on the way the LOGISTIC template is set up, you should also be able to do it tis way:

[pre]
proc template;
define style styles.nogrid;
parent=styles.listing; /* or your favorite style */
Style GraphGridLines from GraphGridLines /
displayopts="off"
;
end;
run;

ods listing style=nogrid; /* or whatever destination you're using */


[/pre]


Let me know if this works for you.

Thanks!
Dan
Ken_oy
Fluorite | Level 6
Great Job! Dan

This is what i want!

Learn a lot from you!

Thanks!!!

Ken

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
  • 7 replies
  • 992 views
  • 0 likes
  • 3 in conversation