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.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
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.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 4432 views
  • 3 likes
  • 2 in conversation