<?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: graph in proc gbarline in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881449#M23894</link>
    <description>I would recommend switching to SGPLOT if possible and using a Data Attribute Map in that case. &lt;BR /&gt;&lt;BR /&gt;You may need to pre-summarize your data though.&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.11/grstatproc/n18szqcwir8q2nn10od9hhdh2ksj.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/vdmmlcdc/8.11/grstatproc/n18szqcwir8q2nn10od9hhdh2ksj.htm&lt;/A&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 19 Jun 2023 19:30:20 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2023-06-19T19:30:20Z</dc:date>
    <item>
      <title>graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881422#M23893</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below code, but instead of summer, i want to have the mean var of spi. Also, how can I give annotations ( like each color presenting which location)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis1 label=(h=0.17 in f=triplex "SPI and count by Year and location")&lt;BR /&gt;value=(h=0.135 in f=triplex) minor=none value=(h=0.07 in f=triplex a=-45)&lt;BR /&gt;color=black;&lt;BR /&gt;axis3 label=none;&lt;BR /&gt;proc gbarline data=totalc;&lt;BR /&gt;bar Year/ sumvar=SPI subgroup=loc width=2 discrete no frame space=1 axis=axis2 maxis=axis1;&lt;BR /&gt;plot /sumvar=count axis=axis3;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 17:52:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881422#M23893</guid>
      <dc:creator>raheleh22</dc:creator>
      <dc:date>2023-06-19T17:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881449#M23894</link>
      <description>I would recommend switching to SGPLOT if possible and using a Data Attribute Map in that case. &lt;BR /&gt;&lt;BR /&gt;You may need to pre-summarize your data though.&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.11/grstatproc/n18szqcwir8q2nn10od9hhdh2ksj.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/vdmmlcdc/8.11/grstatproc/n18szqcwir8q2nn10od9hhdh2ksj.htm&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 19 Jun 2023 19:30:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881449#M23894</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-06-19T19:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881453#M23895</link>
      <description>&lt;P&gt;I tried that in different ways but I could not make clusters or plots by different variables. with this code i could get the graph and summery the data i want as below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="raheleh22_0-1687203453977.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85157i8CB9316ED1BAF11E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="raheleh22_0-1687203453977.png" alt="raheleh22_0-1687203453977.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but now the problem is the precipitation is sum and I want mean. I was able to add annotations.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 19:38:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881453#M23895</guid>
      <dc:creator>raheleh22</dc:creator>
      <dc:date>2023-06-19T19:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881456#M23896</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;is correct. Run the example below and see if this is the desired output. Your data should fit into this pattern. You can also add a discrete attribute map to this example if you want to control the assignment of particular colors to group values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.cars nway;
class origin model;
var msrp;
output out=barcars mean=mean_msrp;
run;

proc summary data=sashelp.cars nway;
class origin;
var horsepower;
output out=linecars mean=mean_power;
run;

data cars;
merge barcars linecars;
by origin;
run;

proc sgplot data=cars;
y2axis min=0 offsetmin=0;
yaxis offsetmin=0;
vbarparm category=origin response=mean_msrp / 
         group=model groupdisplay=cluster;
series x=origin y=mean_power / y2axis markers;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Jun 2023 20:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881456#M23896</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-06-19T20:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881479#M23897</link>
      <description>&lt;P&gt;this is really helpful, but there is a problem. i have my code below, for some reason the calculation of my count_sum is not correct in fact the count sum should be the total of counts per year per location but what this code is giving me is different number ( it is giving the sum of counts per year it is not stratified by loc).&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc summary data=totalc nway;&lt;BR /&gt;class loc year;&lt;BR /&gt;var spi;&lt;BR /&gt;output out=spimean mean=mean_spi;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc summary data=totalc nway;&lt;BR /&gt;class year;&lt;BR /&gt;var count;&lt;BR /&gt;output out=countsum sum=count_sum;&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=totalnew;&lt;BR /&gt;y2axis min=0 offsetmin=0;&lt;BR /&gt;yaxis offsetmin=0;&lt;BR /&gt;vbarparm category=year response=mean_spi /&lt;BR /&gt;group=loc groupdisplay=cluster;&lt;BR /&gt;series x=year y=count_sum / y2axis markers;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 23:19:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881479#M23897</guid>
      <dc:creator>raheleh22</dc:creator>
      <dc:date>2023-06-19T23:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881480#M23898</link>
      <description>&lt;P&gt;Your CLASS statement needs to have "year loc", not "loc year". That's what is causing the miscalculation.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 23:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881480#M23898</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-06-19T23:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881530#M23899</link>
      <description>&lt;P&gt;This is very helpful and fixed the issue. Thanks a lot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 12:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881530#M23899</guid>
      <dc:creator>raheleh22</dc:creator>
      <dc:date>2023-06-20T12:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881532#M23900</link>
      <description>&lt;P&gt;after fixing the issue,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if there is a way I can give color or shape to my circle dots in the below graph. now my bar has a color which is indicating the measure of spi by loc but my circle dots are all the same so it is not expressing count by loc. Is there a way to specify that too?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="raheleh22_0-1687262593357.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85171i6B3FAD5C76525390/image-size/medium?v=v2&amp;amp;px=400" role="button" title="raheleh22_0-1687262593357.png" alt="raheleh22_0-1687262593357.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 12:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881532#M23900</guid>
      <dc:creator>raheleh22</dc:creator>
      <dc:date>2023-06-20T12:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881542#M23901</link>
      <description>&lt;P&gt;If you want the plot to be group-sensitive, get rid of the proc summary &amp;nbsp;and data step calls and simply run the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=totalc;
y2axis min=0 offsetmin=0;
yaxis offsetmin=0;
vbar year / response=spi stat=mean group=loc groupdisplay=cluster;
vline year / response=count stat=sum group=loc y2axis markers;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Jun 2023 13:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881542#M23901</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-06-20T13:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: graph in proc gbarline</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881544#M23902</link>
      <description>&lt;P&gt;It is fixed now. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 14:21:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graph-in-proc-gbarline/m-p/881544#M23902</guid>
      <dc:creator>raheleh22</dc:creator>
      <dc:date>2023-06-20T14:21:02Z</dc:date>
    </item>
  </channel>
</rss>

