BookmarkSubscribeRSS Feed
bubblui
Calcite | Level 5

Hi All,

 

Do we have options or any idea to read the data points plotted in RTF Graph to SAS Dataset.

 

Thank you all.

 

Have a great day..!

10 REPLIES 10
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Simply put, no.  The output is a picture of the rendered output.  You could theoretically look at each pixel of the image, but I wouldn't recommend it.  Get the original data.

bubblui
Calcite | Level 5

Thank you for your reply.

 

Everytime we do theortically.

 

My intention is to do even that with a double programming.

 

As per your answer. The entire Graph what we see in RTF is a Image printed in it right?

 

So we wont be able to read any info from that. Is my understanding is correct.

 

Thanks & Regards,

Praveen Kumar J

DanH_sas
SAS Super FREQ

It is possible to capture the data used to produce the graph (including the calculations) by using the ODS OUTPUT statement. Would that help you?

bubblui
Calcite | Level 5

Hi DanH,

 

Thank you for your reply.

 

Please see my last reply.

 

Let me know if there is a possiblity like that.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Correct.  As others have mentioned below, you have three real options:

- Create your graphs using vector graphics, these are graphics with formula which are then rendered by the program.  This however requires the validator to know how to program those formula which is not easy.  

http://www.w3schools.com/svg/

 

- Create graphs as normal, and use PDF compare or a simliar compare program - this however is really not great as tiny differences or page breaks can completely change it.  So 80% fail rate on that.

 

- Third and final option, and the preferred one - at least in my field.  Create a dataset store - you should be doing this for any validated output, i.e. Tables, Listings.  In that store, put the final dataset before (or from) the output procedure.  That dataset can then be validated by double programming.  For the output file, well many differing views on that from manual review, to attempting to read in the RTF, to storing titles and footnotes separetly for validation etc.  

 

The above of course is all symptomatic of trying to proce a process at the end of it.  My industry appears to be starting to move away from this approach to an up front definition, metadata driven.  Thus all the metadata is defined up front and the code generated from that.  What this would mean is that the end result needs less validation, i.e. if two people supply the same metadata to a validated graph generator, then you can be pretty sure the output will be the same.  More of a, this is what we want, define and document the whole thing, then generate from there and validate against that.

bubblui
Calcite | Level 5

Hi Rw9,

 

Thank you. Have a great day.

 

 

Rick_SAS
SAS Super FREQ

Yes, if you capture the output while the graph is created. See "How to get data values out of ODS graphics."

bubblui
Calcite | Level 5

Hi Rick,

 

Thank you.

 

That was really helpful.

 

At the same I think my thoughts are working beyond imagination.

 

Now for an ex example we havent used ods output statement in PROC LOESS. Finally we will have only RTF or PDF files were GRAPH as its final output printed in it.

 

So is there a possiblity to read the data points from RTF's or PDF's Graph.

 

The criteria here is I have only final output RTF or PDF file with Graph output (I donot have any dataset from PROC LOESS or PROC PLOT procedures to perform compare). Now I need to programmatically QC it.

DanH_sas
SAS Super FREQ

At best, you could get the drawing coordinates from any vector-based output (extracting these values from a PDF document or an EMF document (RTF) would have its own challenges). Even if you get those points, you would need to transform them to get them back the original data points, which would require you to know the oringinal data ranges and physical ranges of all axes (for numeric data). For discrete data, you would have to get the position of all discrete values on the axis and map all corresponding numeric axis points (transformed) to that discrete value. Group values would probably have to be retrieved from corresponding legends, and the visual attributes of the legend "chicklet" would have to be matched to the visual propoerties of each polygon/polyline so that you would know to add the group values to the data observations. This would be quite an interesting task 🙂

bubblui
Calcite | Level 5

Hi DanH,

 

Thank you so much. 

 

Informations were Highly interesting. Have a great day.

 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 10 replies
  • 1341 views
  • 0 likes
  • 4 in conversation