<?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: proc sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592762#M18920</link>
    <description>&lt;P&gt;I think you also need GROUPDISPLAY=CLUSTER to get the look you want in the plot.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2019 17:03:50 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2019-09-30T17:03:50Z</dc:date>
    <item>
      <title>proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592464#M18914</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to generate a sgplot line graph similar to the (reference graph) but unable to generate . any inputs will be apprecaited.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks kindly!!!&lt;/P&gt;&lt;P&gt;reference graph:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="reference_lineGRAPH.JPG" style="width: 529px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32815iA23A4FA71F8339FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="reference_lineGRAPH.JPG" alt="reference_lineGRAPH.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my dataset and graph is below&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-center" image-alt="My_Linegraph.JPG" style="width: 549px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32813i03F7F5C722E60C65/image-size/large?v=v2&amp;amp;px=999" role="button" title="My_Linegraph.JPG" alt="My_Linegraph.JPG" /&gt;&lt;/span&gt;&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-center" image-alt="my_dataset.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32814i3EBE267D10EC2DBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="my_dataset.JPG" alt="my_dataset.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*plot graph and save the graph in rtf file*/

goptions reset=all device=png;
*ods graphics / reset width=5in height=3in;
*ods rtf file="&amp;amp;graphdir\cy1234_001_lab_g.rtf";

Options nodate nonumber orientation=landscape;

Title1 j=c h=1.5 f="Times new roman" "% Change (Mean+/-SE) from Baseline for CY-1234-001";

Title2 j=c h=1.5 f="Times new roman" "Summary for Laboratory test : Nagtotal";

Proc sgplot Data=lb_jittering;

 SERIES X= avisit y= trtpn / LEGENDLABEL =    'Placebo'
    MARKERS LINEATTRS = (pattern= solid THICKNESS = 1)
      MARKERATTRS= (color=black symbol=circle);

 SERIES X = avisit Y = YAXIS / LEGENDLABEL = 'CY-001 10 mg'
    MARKERS LINEATTRS = (PATTERN=SHORTDASH  THICKNESS = 1)
        MARKERATTRS= (color=black symbol=trianglefilled);

 SERIES X = avisit Y = X_AXIS / LEGENDLABEL = 'CY-001 50 mg'
    MARKERS LINEATTRS = (PATTERN=LONGDASH THICKNESS = 1)
     MARKERATTRS= (color=black symbol=squarefilled);

 SERIES X = avisit Y = Y_AXIS / LEGENDLABEL =  'CY-001 100 mg'
    MARKERS LINEATTRS = (PATTERN=DOT THICKNESS = 1)
     MARKERATTRS= (color=black symbol=diamondfilled);

 XAXIS TYPE = DISCRETE; 
         
xaxis label = "Weeks on Treatment";

yaxis integer values=(-20 to 50 by 10)
           label= "% Change from Baseline(Mean+/-SE)";

refline 0; 


run;

quit;
title;
*ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 29 Sep 2019 04:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592464#M18914</guid>
      <dc:creator>azhar7860</dc:creator>
      <dc:date>2019-09-29T04:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592477#M18915</link>
      <description>&lt;P&gt;How about this one ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
 set sashelp.class;
run;
proc sort data=class nodupkey;by age;run;

proc sgplot data=class;
series x=name y=weight/markers discreteoffset=0.5 markerattrs=(symbol=circlefilled);
series x=name y=age/markers discreteoffset=0.2 markerattrs=(symbol=squarefilled);
series x=name y=height/markers discreteoffset=0 markerattrs=(symbol=starfilled);
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 29 Sep 2019 12:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592477#M18915</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-09-29T12:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592541#M18916</link>
      <description>Thanks for the info.&lt;BR /&gt;&lt;BR /&gt;You used 3 different variable for y axis.&lt;BR /&gt;I have a variable TRTP(TRTPN) Which has 4 sub groups . and i am trying to&lt;BR /&gt;get their corresponding values like displayed in reference line graph.&lt;BR /&gt;&lt;BR /&gt;Your response will be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks Kindly&lt;BR /&gt;&lt;BR /&gt;Azhar.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Sep 2019 02:51:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592541#M18916</guid>
      <dc:creator>azhar7860</dc:creator>
      <dc:date>2019-09-30T02:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592705#M18917</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/172715"&gt;@azhar7860&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks for the info.&lt;BR /&gt;&lt;BR /&gt;You used 3 different variable for y axis.&lt;BR /&gt;I have a variable TRTP(TRTPN) Which has 4 sub groups . and i am trying to&lt;BR /&gt;get their corresponding values like displayed in reference line graph.&lt;BR /&gt;&lt;BR /&gt;Your response will be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks Kindly&lt;BR /&gt;&lt;BR /&gt;Azhar.&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since your code showed 4 different y axis variables I am not sure what you actually mean here.&lt;/P&gt;
&lt;P&gt;If you want to display values based on the levels of another variable then use a GROUP= option on the plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to describe for the "want" graph: what the single marker represents, what the "whiskers" actually represent&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And a picture is not data. We cannot write code to make a graph from a picture of data.&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 14:55:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592705#M18917</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-30T14:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592728#M18918</link>
      <description>&lt;P&gt;Thanks for the solution. I use the group option and i am pretty close to my reference graph.&lt;/P&gt;&lt;P&gt;How can i change the line and markers attributes for each subgroup as seen in reference line graph below&lt;/P&gt;&lt;P&gt;Thanks Kindly!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My new&amp;nbsp; output:&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-center" image-alt="Mynew_output.JPG" style="width: 505px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32840i7F89228620517C1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Mynew_output.JPG" alt="Mynew_output.JPG" /&gt;&lt;/span&gt;&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-center" image-alt="reference_lineGRAPH.JPG" style="width: 529px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32841i105124BEEE980FB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="reference_lineGRAPH.JPG" alt="reference_lineGRAPH.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My new code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*plot graph and save the graph in rtf file*/

goptions reset=all device=png;
*ods graphics / reset width=5in height=3in;
*ods rtf file="&amp;amp;graphdir\cy1234_001_lab_g.rtf";

Options nodate nonumber orientation=landscape;

Title1 j=c h=1.5 f="Times new roman" "% Change (Mean+/-SE) from Baseline for CY-1234-001";

Title2 j=c h=1.5 f="Times new roman" "Summary for Laboratory test : Nagtotal";

Proc sgplot Data=lb_jittering;

 Series X= avisit y= y_axis / group=trtp;

 XAXIS TYPE = DISCRETE; 
         
xaxis label = "Weeks on Treatment";

yaxis integer values=(-20 to 50 by 10)
           label= "% Change from Baseline(Mean+/-SE)";

refline 0; 


run;

quit;
title;
*ods rtf close;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Sep 2019 15:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592728#M18918</guid>
      <dc:creator>azhar7860</dc:creator>
      <dc:date>2019-09-30T15:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592749#M18919</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/172715"&gt;@azhar7860&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the solution. I use the group option and i am pretty close to my reference graph.&lt;/P&gt;
&lt;P&gt;How can i change the line and markers attributes for each subgroup as seen in reference line graph below&lt;/P&gt;
&lt;P&gt;Thanks Kindly!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You could add a STYLEATTRS statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;styleattrs&amp;nbsp; datacontrastcolors= (red blue green pink)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; datalinepatterns = (solid shortdash longdash dot)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; datasymbols = ( circlefilled diamondfilled squarefilled trianglefilled)&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;for example would have the first line and marker as red, solid and show a circlefilled for the marker). check the documentation for the different line pattern and marker options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach is a DATTRMAP with which can contain a host of description options including text controls and such which may be more flexible in the long run if you do many similar graphs as then you indicate the name of the data set on the Proc Statement and then in the specific plot use the ATTRID= name, where name is one of the sets of rules for displaying a GROUP variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 16:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592749#M18919</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-30T16:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592762#M18920</link>
      <description>&lt;P&gt;I think you also need GROUPDISPLAY=CLUSTER to get the look you want in the plot.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592762#M18920</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-09-30T17:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592772#M18921</link>
      <description>&lt;P&gt;Thanks for the input. I amended the code but somehow the datasymbols option is not working, i will check the resources you mentioned.&lt;/P&gt;&lt;P&gt;my new output&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-center" image-alt="new_output.JPG" style="width: 502px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32843iE603BD1CD1C250EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="new_output.JPG" alt="new_output.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My amended code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*plot graph and save the graph in rtf file*/

goptions reset=all device=png;
*ods graphics / reset width=5in height=3in;
*ods rtf file="&amp;amp;graphdir\cy1234_001_lab_g.rtf";

Options nodate nonumber orientation=landscape;

Title1 j=c h=1.5 f="Times new roman" "% Change (Mean+/-SE) from Baseline for CY-1234-001";

Title2 j=c h=1.5 f="Times new roman" "Summary for Laboratory test : Nagtotal";

Proc sgplot Data=lb_jittering;

 Series X= avisit y= y_axis / group=trtp GROUPDISPLAY=CLUSTER;
 styleattrs  datacontrastcolors= (grey)                                           /*(red blue green pink)*/                

                 datalinepatterns = (solid shortdash longdash dot)

                 datasymbols = ( circle trianglefilled  squarefilled  diamondfilled);

 XAXIS TYPE = DISCRETE; 
         
xaxis label = "Weeks on Treatment";

yaxis integer values=(-20 to 50 by 10)
           label= "% Change from Baseline(Mean+/-SE)";

refline 0; 


run;

quit;
title;
*ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592772#M18921</guid>
      <dc:creator>azhar7860</dc:creator>
      <dc:date>2019-09-30T17:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592773#M18922</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/172715"&gt;@azhar7860&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the input. I amended the code but somehow the datasymbols option is not working, i will check the resources you mentioned.&lt;/P&gt;
&lt;P&gt;my new output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You have to add the MARKERS option on the Series plot to display markers.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:38:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592773#M18922</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-30T17:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592775#M18923</link>
      <description>Thanks a lot!</description>
      <pubDate>Mon, 30 Sep 2019 17:43:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/592775#M18923</guid>
      <dc:creator>azhar7860</dc:creator>
      <dc:date>2019-09-30T17:43:52Z</dc:date>
    </item>
  </channel>
</rss>

