My software version: sas base v9.4 and sas eg v7.15
My code:
ods listing gpath="c:\sasabc";
ods graphics on/ imagefmt=png imagename="plot" width=3200 height=4000;
proc sgplot data=A;
scatter y=day x=time_1 / transparency=0.9 markerattrs=(symbol=circlefilled color=red size=6);
yaxis label="Day" labelattrs=(size=12) valueattrs=(size=12) grid values=(1 to 31 by 1);
xaxis label="Time" labelattrs=(size=12) valueattrs=(size=8) interval=hour ;
ods graphics off;
ods listing close;
My data:
see attachments
Description:
I could't draw this statistical plot via the above file and code on SAS base. However, it can work grudgingly on SAS EG.
#question 1:
When I press the execute button, SAS base showed that PROC SGPLOT is carrying out. It took more than 10 minutes to output no results. How to solve this question?
#question 2:
It can work on SAS EG. However, it only showed the contracted drawing and couldn't showed the designed plot. How to solve this question?
Thanks for your time.
@Cingchih wrote:
My software version: sas base v9.4 and sas eg v7.15
My code:
ods listing gpath="c:\sasabc"; ods graphics on/ imagefmt=png imagename="plot.png" width=3200 height=4000; proc sgplot data=A; scatter y=day x=time_1 / transparency=0.9 markerattrs=(symbol=circlefilled color=red size=6); yaxis label="Day" labelattrs=(size=12) valueattrs=(size=12) grid values=(1 to 31 by 1); xaxis label="Time" labelattrs=(size=12) valueattrs=(size=8) interval=hour ; ods graphics off; ods listing close;
My data:
see attachments
Description:
I could't draw this statistical plot via the above file and code on SAS base. However, it can work grudgingly on SAS EG.
#question 1:
When I press the execute button, SAS base showed that PROC SGPLOT is carrying out. It took more than 10 minutes to output no results. How to solve this question?
What did the SAS log say for PROC SGPLOT? Were there any errors, warnings?
#question 2:
It can work on SAS EG. However, it only showed the contracted drawing and couldn't showed the designed plot. How to solve this question?
What's wrong with this plot?
Also, many of us will not download Microfsoft office documents, as they are security threats. Please provide a small portion of your data using this method: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...
How large is your real data set anyway? How many records, how many observations?
attachment file
https://drive.google.com/open?id=1-hDSV00_VJtMTEHfNbADvzv7n5Id8wwV
280kb, two Variables, 18004 records
In the contracted drawing, its width and height is not 3200px and 4000px, respectively.
In addition, its didn't export the png file.
Are there any ERRORs or WARNINGs in the log?
I don't think anyone is going to try to download that file. This is a security risk. You need to follow the instructions I linked to in order to provide us with the data (and we don't need the entire data set, a 100 lines is more than enough).
Are there any ERRORs or WARNINGs in the log?
It didn't show any errors or warnings. Because It is still running. I tried to let it run, but it took more than 10 minutes not to finish. Finally, I quitted the running code.
data a;
input time_1 time8. day ;
format time_1 time8.;
datalines;
01:26:00 1
02:01:00 1
06:09:00 1
02:49:00 1
06:20:00 1
06:19:00 1
07:47:00 1
16:25:00 2
15:51:00 2
15:12:00 2
16:34:00 2
16:26:00 2
16:43:00 2
17:56:00 2
18:31:00 2
18:53:00 2
19:10:00 2
15:00:00 3
15:40:00 3
16:10:00 3
13:26:00 3
12:15:00 3
16:53:00 3
18:47:00 3
20:00:00 3
20:50:00 3
11:08:00 5
11:09:00 5
10:20:00 5
10:56:00 5
12:07:00 5
11:10:00 5
14:24:00 5
14:11:00 5
14:12:00 5
14:45:00 5
14:44:00 5
12:31:00 5
15:28:00 5
;run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.