<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: If X and Y are Zero No graph in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43527#M1417</link>
    <description>Hi:&lt;BR /&gt;
  Well, I have several questions lumped into 2 main question categories:&lt;BR /&gt;
1) Do you really only have Base SAS?? Or do you have Enterprise Guide? If so, can you produce charts using the Graph Tasks in EG?? Do you have SAS/GRAPH in addition to Base SAS?? What code are you using?? PROC GCHART? PROC GPLOT?? PROC SGPLOT??? PROC PLOT??? I would think the graphics produced by PROC PLOT would be unacceptable in look and feel. What code are you using to produce your graphs?&lt;BR /&gt;
&lt;BR /&gt;
2) Using the terms X and Y implies to me that you have some kind of scatter plot or series plot. So you wouldn't be plotting just 1 X or 1 Y value??? Do you mean that ALL the X and Y values are 0??? What does your data look like??? &lt;BR /&gt;
 &lt;BR /&gt;
For example, consider the program below. The dataset WORK.ZEROES has all 0 values for HEIGHT and WEIGHT -- a Graph -- not a very pretty one -is- produced for this data situation. As opposed to WORK.MISSING, where the values for HEIGHT and WEIGHT are all missing. In that case, a warning is issued in the SAS log.&lt;BR /&gt;
 &lt;BR /&gt;
Can you share some more information about your data and the code you've tried?? Given the output from my program, what would you expect to see for the graph on WORK.ZEROES and where you would you expect to see it??? A message in the graph, a message in the ODS file?? What ODS destination are you using for your output??? (I use ODS RTF for output below.)&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data zeroes;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  height = 0;&lt;BR /&gt;
  weight = 0;&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
data missing;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  height=.;&lt;BR /&gt;
  weight=.;&lt;BR /&gt;
run;&lt;BR /&gt;
                   &lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods rtf file='use_gplot.rtf';&lt;BR /&gt;
proc gplot data=sashelp.class;&lt;BR /&gt;
  title 'Have Values';&lt;BR /&gt;
  plot height*weight;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
                   &lt;BR /&gt;
proc gplot data=work.zeroes;&lt;BR /&gt;
  title 'Have ALL 0';&lt;BR /&gt;
  plot height*weight;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
                  &lt;BR /&gt;
proc gplot data=work.missing;&lt;BR /&gt;
  title 'Have ALL Missing Values';&lt;BR /&gt;
  plot height*weight;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
ods rtf close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Fri, 03 Dec 2010 22:41:57 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-12-03T22:41:57Z</dc:date>
    <item>
      <title>If X and Y are Zero No graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43524#M1414</link>
      <description>Hello &lt;BR /&gt;
&lt;BR /&gt;
       i am working on Base SAS.&lt;BR /&gt;
Can any one tell me the procedure for &lt;BR /&gt;
&lt;BR /&gt;
If X and Y are zero then instead of empty graph, message should be displayed.&lt;BR /&gt;
&lt;BR /&gt;
Is it possible in Base SAS to create such a report.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Sid</description>
      <pubDate>Thu, 02 Dec 2010 22:14:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43524#M1414</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-12-02T22:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: If X and Y are Zero No graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43525#M1415</link>
      <description>I'll tackle 1/2 the question...&lt;BR /&gt;
&lt;BR /&gt;
With just Base SAS (ie, without SAS/Graph), you can generate a simple scatter plot using 'proc plot', as follows...&lt;BR /&gt;
&lt;BR /&gt;
proc plot data=sashelp.class;&lt;BR /&gt;
plot height*weight='*';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Per checking the values first, and writing out a message if they are zero - I guess you could do that in a little macro or something, and maybe 'put' statements (or 'proc print' of a file containing the desired text).  Probably a lot of different ways to do this.  I'll let an expert in that area field that part though! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 03 Dec 2010 00:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43525#M1415</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-12-03T00:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: If X and Y are Zero No graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43526#M1416</link>
      <description>thanks robert..&lt;BR /&gt;
i tried but i couldnt get the code...if anybody know the solution please help me.</description>
      <pubDate>Fri, 03 Dec 2010 18:30:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43526#M1416</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-12-03T18:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: If X and Y are Zero No graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43527#M1417</link>
      <description>Hi:&lt;BR /&gt;
  Well, I have several questions lumped into 2 main question categories:&lt;BR /&gt;
1) Do you really only have Base SAS?? Or do you have Enterprise Guide? If so, can you produce charts using the Graph Tasks in EG?? Do you have SAS/GRAPH in addition to Base SAS?? What code are you using?? PROC GCHART? PROC GPLOT?? PROC SGPLOT??? PROC PLOT??? I would think the graphics produced by PROC PLOT would be unacceptable in look and feel. What code are you using to produce your graphs?&lt;BR /&gt;
&lt;BR /&gt;
2) Using the terms X and Y implies to me that you have some kind of scatter plot or series plot. So you wouldn't be plotting just 1 X or 1 Y value??? Do you mean that ALL the X and Y values are 0??? What does your data look like??? &lt;BR /&gt;
 &lt;BR /&gt;
For example, consider the program below. The dataset WORK.ZEROES has all 0 values for HEIGHT and WEIGHT -- a Graph -- not a very pretty one -is- produced for this data situation. As opposed to WORK.MISSING, where the values for HEIGHT and WEIGHT are all missing. In that case, a warning is issued in the SAS log.&lt;BR /&gt;
 &lt;BR /&gt;
Can you share some more information about your data and the code you've tried?? Given the output from my program, what would you expect to see for the graph on WORK.ZEROES and where you would you expect to see it??? A message in the graph, a message in the ODS file?? What ODS destination are you using for your output??? (I use ODS RTF for output below.)&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data zeroes;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  height = 0;&lt;BR /&gt;
  weight = 0;&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
data missing;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  height=.;&lt;BR /&gt;
  weight=.;&lt;BR /&gt;
run;&lt;BR /&gt;
                   &lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods rtf file='use_gplot.rtf';&lt;BR /&gt;
proc gplot data=sashelp.class;&lt;BR /&gt;
  title 'Have Values';&lt;BR /&gt;
  plot height*weight;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
                   &lt;BR /&gt;
proc gplot data=work.zeroes;&lt;BR /&gt;
  title 'Have ALL 0';&lt;BR /&gt;
  plot height*weight;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
                  &lt;BR /&gt;
proc gplot data=work.missing;&lt;BR /&gt;
  title 'Have ALL Missing Values';&lt;BR /&gt;
  plot height*weight;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
ods rtf close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 03 Dec 2010 22:41:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/If-X-and-Y-are-Zero-No-graph/m-p/43527#M1417</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-12-03T22:41:57Z</dc:date>
    </item>
  </channel>
</rss>

