BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cingchih
Quartz | Level 8

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.

Image 020.png

1 ACCEPTED SOLUTION

Accepted Solutions
Cingchih
Quartz | Level 8
I am sorry. I neglected the "run" word at the proc sgplot.

Thank you for your reply.

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

@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?

--
Paige Miller
Cingchih
Quartz | Level 8

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.

 

 

 

 

PaigeMiller
Diamond | Level 26

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).

--
Paige Miller
Cingchih
Quartz | Level 8

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;

 

 

Cingchih
Quartz | Level 8
I am sorry. I neglected the "run" word at the proc sgplot.

Thank you for your reply.

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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
  • 5 replies
  • 875 views
  • 0 likes
  • 2 in conversation