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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1491 views
  • 0 likes
  • 3 in conversation