<?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 Proc SGPLOT for zero OBS and display No Data Report in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-for-zero-OBS-and-display-No-Data-Report/m-p/681434#M20454</link>
    <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am Using Proc SGPLOT and i am stuck when data is zero obs when subject is missing from data&lt;/P&gt;&lt;P&gt;Please guide me how to display graph with X ,Y axis values with No data report in middle of graph box .&lt;/P&gt;&lt;P&gt;It will be better legends will dispaly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below code for sg plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="raja777pharma_0-1599154978583.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48977iD74241D7E97CD23F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="raja777pharma_0-1599154978583.png" alt="raja777pharma_0-1599154978583.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Raja.B&lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2020 17:43:52 GMT</pubDate>
    <dc:creator>raja777pharma</dc:creator>
    <dc:date>2020-09-03T17:43:52Z</dc:date>
    <item>
      <title>Proc SGPLOT for zero OBS and display No Data Report</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-for-zero-OBS-and-display-No-Data-Report/m-p/681434#M20454</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am Using Proc SGPLOT and i am stuck when data is zero obs when subject is missing from data&lt;/P&gt;&lt;P&gt;Please guide me how to display graph with X ,Y axis values with No data report in middle of graph box .&lt;/P&gt;&lt;P&gt;It will be better legends will dispaly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below code for sg plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="raja777pharma_0-1599154978583.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48977iD74241D7E97CD23F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="raja777pharma_0-1599154978583.png" alt="raja777pharma_0-1599154978583.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Raja.B&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:43:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-for-zero-OBS-and-display-No-Data-Report/m-p/681434#M20454</guid>
      <dc:creator>raja777pharma</dc:creator>
      <dc:date>2020-09-03T17:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPLOT for zero OBS and display No Data Report</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-for-zero-OBS-and-display-No-Data-Report/m-p/681435#M20455</link>
      <description>&lt;P&gt;You really ought to provide the code as text pasted into the box that appears when you click on the "running man" icon, and not as a screen capture from now on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To solve your problem, you would need to use a macro. You compute the number of observations in your data set. If the number of observations is above 0 (or above any number you choose) then you create the plot. Otherwise, you branch around the plot code.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:48:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-for-zero-OBS-and-display-No-Data-Report/m-p/681435#M20455</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-03T17:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPLOT for zero OBS and display No Data Report</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-for-zero-OBS-and-display-No-Data-Report/m-p/681515#M20456</link>
      <description>&lt;P&gt;Your example "code" is incomplete in that you show&lt;/P&gt;
&lt;PRE&gt;%if &amp;amp;sqlobs &amp;gt; 0 %then %do;&lt;/PRE&gt;
&lt;P&gt;but no matching end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would want a block of code inside.&lt;/P&gt;
&lt;P&gt;%else %do;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;Maybe something like:&lt;/P&gt;
&lt;PRE&gt;%else %do;
Data dummy;
   x=48;
   y=3;
   text="No Data";
run;

proc sgplot data=dummy;
   text x=x y=y text=text;
   &amp;lt;your xaxis and yaxis go here
    as I am too lazy to retype
    everything
    &amp;gt;
run;
%end;&lt;/PRE&gt;
&lt;P&gt;I picked x and y values should have the text appear near the middle of the graph with the XAXIS and YAXIS statements you showed. Feel free to play with them or the actual text of the text variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 21:45:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-for-zero-OBS-and-display-No-Data-Report/m-p/681515#M20456</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-03T21:45:41Z</dc:date>
    </item>
  </channel>
</rss>

