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

Hi All,

 

I've got a job that uses ODS graphics to write a PDF graph with imagefmt=pdf.  Ran fine in 9.3, but in 9.4M3 it throws:

 

"WARNING: This graph has too many graphical elements. You may not be able to get any vector graphics output and in that case, you can set your output format to an image type."

 

Curious as to what might have changed between 9.3 and 9.4 that causes this, and if there might be away to get vector graph output even when there is a lot of output?  (analagous to antialiasmax)

 

Below trivial example replicates the problem in 9.4, but runs fine in 9.3.

 

data have;
  dv=5 ;
  do iv=1 to 20 ;
    do n=1 to 10000 ;
      output ;
    end ;
  end ;
run ;

proc template;
  define statgraph myplot;   
    begingraph;
      layout overlay ;
        seriesplot x=iv y=dv  ;
      endlayout; 
    endgraph;
  end;
run;

ods graphics /imagefmt=pdf ;
proc sgrender data=have template=myplot;
run ;

 

Yes, I realize above is using 200,000 data points to plot a horizontal line.   My actualy code is not quite that silly.  

 

In addition to whether I can tell SAS to avoid this limitation, curious what changed between 9.3 and 9.4.  Was 9.3 perhaps silently deciding to switch from a vector graph to some other image format?  Or was 9.3 willing to grind away for a long time and produce a vector graph with a lot of data in it?  Or....

 

Thanks,

--Q.

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
1 ACCEPTED SOLUTION

Accepted Solutions
PrashantH_sas
SAS Employee

Hi Quentin,

 

This is an advisory warning that was introduced in SAS 9.4M3. The pdf ouput should still get generated. If your output is larger than what can be handled by the system, you will see a subsequent error message (out of memory) .

 

Do note, that loading a large vector graphics file, such as an SVG in some browsers will be very slow and will appear as if the system is hanging. The warning was introduced for that reason.

 

If smaller file sizes are important, a raster image output (even at reasonably large DPIs) will be smaller than the equivalent vector output in such cases.

 

With Regards,

 -Prashant.

View solution in original post

2 REPLIES 2
PrashantH_sas
SAS Employee

Hi Quentin,

 

This is an advisory warning that was introduced in SAS 9.4M3. The pdf ouput should still get generated. If your output is larger than what can be handled by the system, you will see a subsequent error message (out of memory) .

 

Do note, that loading a large vector graphics file, such as an SVG in some browsers will be very slow and will appear as if the system is hanging. The warning was introduced for that reason.

 

If smaller file sizes are important, a raster image output (even at reasonably large DPIs) will be smaller than the equivalent vector output in such cases.

 

With Regards,

 -Prashant.

Quentin
Super User

Thanks @PrashantH_sas, that's very helpful to know that this warning is advisory, and if an image truly cannot be produced, it will throw an error.  Unfortunately, our server is down for some scheduled maintenance, so I won't be able to play with this again until next week.  Probably will end up converting to raster image in the long term, but good to know that fort the short term I can safely ignore this warning (accepting the risk of longer process times).

 

--Q.

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 3951 views
  • 3 likes
  • 2 in conversation