The SAS Output Delivery System and reporting techniques

Generate data points for graph

Reply
New Contributor
Posts: 3

Generate data points for graph

Hi,
I know nothing about SAS and I hope this is an appropriate place to post this question. If not, I hope someone can point me in the right direction. I'm a typesetter and I usually create graphs in Adobe Illustrator by inputing the data points provided by our authors. I have an author who has done a graph in SAS and says, "The graph is generated by the SAS procedure as a JPG file. I can send this, but the procedure does not provide data points as such." I don't understand how it would be possible to have a line graph and not have any way to access data points that the graph is based on. Is this really not possible or is the author simply not understanding what we're asking for? Can someone give me some simple instructions I can pass along to the author for being able to generate the data points? Thanks for any help you can provide.
Bill
SAS Super FREQ
Posts: 8,862

Re: Generate data points for graph

Hi,
Would data points like this be useful to you???
[pre]
<map name="M1B5B7BN">
<area shape=poly alt="Region: Western Europe
Total Sales: $4,873,000" title="Region: Western Europe
Total Sales: $4,873,000" coords="466,432,454,424,450,419,450,65,461,61,473,57,485,54,491,53,539,53,545,54,557,63,559,68,559,416,558,421,546,424,534,428,522,431,468,432,">
<area shape=poly alt="Region: Canada
Total Sales: $4,255,712" title="Region: Canada
Total Sales: $4,255,712" coords="320,432,308,423,304,419,304,113,306,109,318,105,330,102,342,98,402,101,413,110,413,416,412,421,400,425,388,428,376,432,">
<area shape=poly alt="Region: Asia
Total Sales: $460,231" title="Region: Asia
Total Sales: $460,231" coords="174,432,162,423,158,418,158,388,169,384,181,380,193,377,247,376,253,377,259,381,265,385,267,391,267,421,255,424,243,428,231,431,177,432,">
</map>

[/pre]

It was created using this syntax (below) -- and even though ODS created a .PNG file for display (a bar chart with 3 bars),
the map tag of bar values is included in the HTML file created with the above syntax.

[pre]
options nodate nonumber;

ods html path='c:\temp' (url=none)
file='html_ax_dp.html' style=sasweb;
goptions reset=all border device=actximg;

proc gchart data=sashelp.shoes;
title 'Vertical Bar Chart';
where region in ('Asia', 'Canada', 'Western Europe');
vbar3d Region / shape=hexagon sumvar=sales;
run;
quit;
title;

ods html close;
ods listing;
[/pre]

Basically, I just ignored the .PNG file and looked inside the HTML file. Of course, this method may be cumbersome
for more complicated pictures. Your person who's delivering the information might be better off setting up a conference
call between you and him and Technical Support. The datapoints for any graphics produced with SAS/Graph come directly
from a SAS dataset -- so possibly the UNSUMMARIZED values would be in the dataset and to product the graphic, SAS/Graph
is consolidating the values. I assume that you would NOT want the unsummarized values. It is entirely possible that Tech Support will have
a better solution for what you want.

To learn how to contact Tech Support, have your person refer to:
http://support.sas.com/techsup/contact/index.html

cynthia
New Contributor
Posts: 3

Re: Generate data points for graph

Posted in reply to Cynthia_sas
Thanks, Cynthia. I could easily create a bar chart with that map data. So, I take it that SAS can easily generate html code for its graphs? I would imagine a line graph would create very different html code, though. But, maybe I could just see if the author can generate an html file for me for the graph and that would include the data I need.
Bill
SAS Super FREQ
Posts: 8,862

Re: Generate data points for graph

Hi:
This is what the <MAP> tag looks like for a plot of Dow Jones yearly highs:
[pre]

<map name="M1B5D27H">
<area shape=poly alt="year: 1995
high: 5216" title="year: 1995
high: 5216" coords="608,99,605,96,605,90,608,87,611,86,614,87,617,90,618,93,617,96,614,99,611,99,">
<area shape=poly alt="year: 1994
high: 3978" title="year: 1994
high: 3978" coords="596,175,593,173,591,170,591,167,593,164,596,162,599,162,602,164,604,167,604,170,602,173,599,175,">
<area shape=poly alt="year: 1993
high: 3794" title="year: 1993
high: 3794" coords="581,186,578,183,577,180,578,177,580,174,583,173,586,174,589,176,590,179,590,182,588,185,585,186,582,186,">
<area shape=poly alt="year: 1992
high: 3413" title="year: 1992
high: 3413" coords="570,210,567,209,564,206,564,200,567,197,573,197,576,200,577,203,576,206,573,209,">
<area shape=poly alt="year: 1991
high: 3169" title="year: 1991
high: 3169" coords="553,224,551,221,550,218,551,215,553,212,559,212,561,214,563,217,561,223,558,224,555,224,">
<area shape=poly alt="year: 1990
high: 3000" title="year: 1990
high: 3000" coords="542,235,539,234,537,231,536,228,537,225,540,223,543,222,546,223,548,225,549,228,549,231,546,234,543,235,">
<area shape=poly alt="year: 1989
high: 2791" title="year: 1989
high: 2791" coords="529,248,526,247,523,244,523,238,526,235,532,235,535,238,536,241,535,244,532,247,">
<area shape=poly alt="year: 1987
high: 2722" title="year: 1987
high: 2722" coords="501,252,498,251,496,248,495,245,496,242,499,240,502,239,505,240,507,242,508,245,508,248,505,251,502,252,">
<area shape=poly alt="year: 1988
high: 2184" title="year: 1988
high: 2184" coords="515,285,512,284,510,281,509,278,510,275,513,272,516,272,519,273,521,276,522,279,521,282,518,284,">
<area shape=poly alt="year: 1986
high: 1956" title="year: 1986
high: 1956" coords="488,299,485,298,482,295,482,289,485,286,491,286,494,289,495,292,494,295,491,298,">
<area shape=poly alt="year: 1985
high: 1553" title="year: 1985
high: 1553" coords="472,323,469,320,468,317,469,314,471,311,474,310,477,311,480,313,481,316,480,319,478,322,475,323,">
<area shape=poly alt="year: 1984
high: 1287" title="year: 1984
high: 1287" coords="461,340,458,339,455,336,454,333,455,330,458,327,464,327,467,330,467,336,464,339,">
<area shape=poly alt="year: 1983
high: 1287" title="year: 1983
high: 1287" coords="447,340,444,339,441,336,441,330,444,327,450,327,453,330,453,336,450,339,">
<area shape=poly alt="year: 1982
high: 1071" title="year: 1982
high: 1071" coords="433,353,430,352,428,349,427,346,428,343,431,340,434,340,437,341,439,344,440,347,439,350,436,352,">
<area shape=poly alt="year: 1973
high: 1052" title="year: 1973
high: 1052" coords="309,354,306,352,304,349,304,346,306,343,309,341,312,341,315,343,317,346,317,349,315,352,312,354,">
<area shape=poly alt="year: 1972
high: 1036" title="year: 1972
high: 1036" coords="296,355,293,354,291,351,290,348,291,345,294,343,297,342,300,343,303,345,303,351,300,354,297,355,">
<area shape=poly alt="year: 1981
high: 1024" title="year: 1981
high: 1024" coords="420,356,417,355,414,352,413,349,414,346,417,343,423,343,426,346,426,352,423,355,">
<area shape=poly alt="year: 1976
high: 1015" title="year: 1976
high: 1015" coords="349,356,346,353,345,350,346,347,348,344,351,343,354,344,357,346,358,349,358,352,355,355,352,356,">
<area shape=poly alt="year: 1980
high: 1000" title="year: 1980
high: 1000" coords="404,357,401,355,400,352,400,349,402,346,405,344,411,346,412,349,412,352,411,355,408,357,405,357,">
<area shape=poly alt="year: 1977
high: 1000" title="year: 1977
high: 1000" coords="363,357,360,355,359,352,359,349,361,346,364,344,370,346,371,349,371,352,370,355,367,357,364,357,">
<area shape=poly alt="year: 1966
high: 995" title="year: 1966
high: 995" coords="212,357,209,354,209,348,212,345,215,344,218,345,221,348,222,351,221,354,218,357,215,357,">
<area shape=poly alt="year: 1968
high: 985" title="year: 1968
high: 985" coords="241,358,238,356,236,353,236,350,238,347,241,345,244,345,247,347,248,350,248,353,247,356,244,358,">
<area shape=poly alt="year: 1969
high: 969" title="year: 1969
high: 969" coords="254,359,251,357,250,354,250,351,251,348,254,346,257,346,260,347,262,350,262,356,259,358,256,359,">
<area shape=poly alt="year: 1965
high: 969" title="year: 1965
high: 969" coords="200,359,197,357,195,354,195,351,197,348,200,346,203,346,206,348,208,351,208,354,206,357,203,359,">
<area shape=poly alt="year: 1971
high: 951" title="year: 1971
high: 951" coords="281,360,278,357,277,354,277,351,280,348,283,347,286,348,289,350,290,353,289,356,287,359,284,360,">
<area shape=poly alt="year: 1967
high: 943" title="year: 1967
high: 943" coords="229,361,226,360,223,358,222,355,223,352,225,349,228,348,231,348,234,350,235,353,235,356,233,359,230,360,">
<area shape=poly alt="year: 1979
high: 898" title="year: 1979
high: 898" coords="390,363,387,360,386,357,387,354,389,351,392,350,395,351,398,353,399,356,399,359,397,362,394,363,391,363,">
<area shape=poly alt="year: 1978
high: 908" title="year: 1978
high: 908" coords="378,363,375,361,373,358,373,355,374,352,377,350,380,350,383,351,385,354,385,357,384,360,381,362,">
<area shape=poly alt="year: 1975
high: 882" title="year: 1975
high: 882" coords="335,364,332,361,332,355,335,352,338,351,341,352,344,355,344,361,341,364,338,364,">
<area shape=poly alt="year: 1974
high: 892" title="year: 1974
high: 892" coords="324,364,321,363,318,360,318,357,319,354,321,352,324,351,327,351,330,354,331,357,330,360,328,363,325,364,">
<area shape=poly alt="year: 1964
high: 892" title="year: 1964
high: 892" coords="187,364,184,363,182,360,181,357,182,354,185,351,188,351,191,352,193,354,194,357,194,360,191,363,188,364,">
<area shape=poly alt="year: 1970
high: 842" title="year: 1970
high: 842" coords="269,367,266,366,264,363,263,360,264,357,267,354,270,354,273,355,275,357,276,360,275,363,273,366,270,367,">
<area shape=poly alt="year: 1963
high: 767" title="year: 1963
high: 767" coords="171,371,168,368,168,362,171,359,174,358,177,359,180,362,181,365,180,368,177,371,174,371,">
<area shape=poly alt="year: 1961
high: 735" title="year: 1961
high: 735" coords="144,373,141,370,140,367,141,364,143,361,146,360,149,361,152,363,153,366,153,369,151,372,148,373,145,373,">
<area shape=poly alt="year: 1962
high: 726" title="year: 1962
high: 726" coords="159,374,156,372,154,369,154,366,156,363,159,361,162,361,165,363,167,366,167,369,165,372,162,373,">
<area shape=poly alt="year: 1960
high: 685" title="year: 1960
high: 685" coords="130,376,127,373,127,367,130,364,133,363,136,364,139,367,140,370,139,373,136,376,133,376,">
<area shape=poly alt="year: 1959
high: 679" title="year: 1959
high: 679" coords="119,377,116,376,114,373,113,370,114,367,116,365,119,364,122,364,125,367,126,370,125,373,123,376,120,377,">
<area shape=poly alt="year: 1958
high: 584" title="year: 1958
high: 584" coords="106,383,103,382,100,379,99,376,100,373,103,370,109,370,112,373,112,379,109,382,">
<area shape=poly alt="year: 1957
high: 521" title="year: 1957
high: 521" coords="89,386,86,383,86,377,89,374,92,373,95,374,98,377,99,380,98,383,95,386,92,386,">
<area shape=poly alt="year: 1956
high: 521" title="year: 1956
high: 521" coords="76,386,73,384,72,381,72,378,74,375,77,374,80,374,83,375,85,378,85,381,83,384,80,386,77,386,">
<area shape=poly alt="year: 1955
high: 488" title="year: 1955
high: 488" coords="62,388,59,385,58,382,59,379,62,376,65,375,68,376,71,379,71,385,68,388,65,388,">
</map>

[/pre]

The syntax would pretty much be the same as previously posted, with his GPLOT procedure replacing the GCHART procedure. Tech Support really can help him figure out if there's a better way to deliver the data points to you.

cynthia
New Contributor
Posts: 3

Re: Generate data points for graph

Posted in reply to Cynthia_sas
Thanks. I'll contact the author and see if he can run the gplot procedure. It looks like it creates data that I could use.
Bill
Ask a Question
Discussion stats
  • 4 replies
  • 148 views
  • 0 likes
  • 2 in conversation