BookmarkSubscribeRSS Feed
Kanyange
Fluorite | Level 6

Hi,

I would like to copy the data behind the graph (the graph was generated by proc gchart). I can see the data, but I would like

To copy the data and it doesn’t seem that there is a copy option . Please see Pdf attached.

Many Thanks

proc gchart

data=EMWS19.Ids_DATA gout=WORK.PlotGRAPH IMAGEMAP=report;

*;

title "score";

vbar score /

name = "score" description = "score"

FREQ

type=FREQ

noframe

missing

raxis=axis1 maxis=axis2;

run;

quit;

title;

goptions display;

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

Not sure what software that was for the PDF, however you must have the raw data there as

EMWS19.Ids_DATA

Can you not just run a proc freq on that?

Kanyange
Fluorite | Level 6

The proc freq won't show me how the graph is been built, basically I want to see for each bar what's the frequency (in a table), you can double clik on the graph and see the data that has helped to create the graph but I can't copy it...basiccaly, the data will be smaller, the number of rows will be equal to the number of bars (for example 50 bars) and ecah bar will have a frequency (Volume) ...Hope I make sense...Thank you

RW9
Diamond | Level 26 RW9
Diamond | Level 26

What software are you using for the graph?

proc sql;

     create table want as

     select     distinct

                    SCORE,

                    COUNT(1) as FREQ

     from        EMWS19.Ids_DATA

     group by SCORE;

quit;

Should be all you need to get frequency per score.

Kanyange
Fluorite | Level 6

That's not what I want...I am using SAS and have run the code below...the graph is giving me a histogramm but the data used behind this histogramm
has been binned ...so I want to see how SAS has binned it..Proc freq and the slq won't give me the data behind the histogramm!! Could you please run this code, you will get a graph, and if you copy in excel and double click there is a data options, the data can be edited but you can't copy it!

proc gchart

data=EMWS19.Ids_DATA gout=WORK.PlotGRAPH IMAGEMAP=report;

*;

title "score";

vbar score /

name = "score" description = "score"

FREQ

type=FREQ

noframe

missing

raxis=axis1 maxis=axis2;

run;

quit;

title;

goptions display

KenDodds
Calcite | Level 5

You could look at the HISTOGRAM statement in PROC UNIVARIATE. Using the OUTHISTOGRAM= generates a dataset with the midpoints, counts and percentages. I would think that SAS uses the same algorithm for histogram construction here as in GCHART, but a quick look at the help doesn't give any details (you can find a reference for the old way of doing it, still available with MIDPOINTS=OLD).

Reeza
Super User

Repost this in the SAS Graphics section rather than Statistical. Then one of the SAS Graphing experts will be able to help.

If you're open to using the SG Procedures (GCHART is outdated) then I believe there's a way to get the data behind the graph.

Proc Freq or Proc Univariate should work as well Smiley Happy

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1680 views
  • 0 likes
  • 4 in conversation