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.

Check out the Boston Area SAS Users Group (BASUG) video archives: https://www.basug.org/videos.
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
PROC Star

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.

Check out the Boston Area SAS Users Group (BASUG) video archives: https://www.basug.org/videos.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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