<?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: help on SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31468#M1018</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please attach program with data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2012 21:37:53 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2012-05-02T21:37:53Z</dc:date>
    <item>
      <title>help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31460#M1010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new in SAS and would appreciate it if someone can help on SGPLOT.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use SGPLOT (not SGPANEL) to make 3 separate plots, one for each ID number.&amp;nbsp; is it possible? How? &lt;/P&gt;&lt;P&gt;The dataset and a SAS code for a plot of all 3 IDs in one graph are attached.&amp;nbsp; &lt;/P&gt;&lt;P&gt;My question is how to make 3 ﻿separate plots, one for each ID number using SGPLOT not SGPANEL.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;﻿﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 18:49:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31460#M1010</guid>
      <dc:creator>John70</dc:creator>
      <dc:date>2012-01-17T18:49:53Z</dc:date>
    </item>
    <item>
      <title>help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31461#M1011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the BY statement:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 14pt; background-color: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 14pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 14pt; background-color: white; font-family: 'Courier New';"&gt;sgplot&lt;/STRONG&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt;=SCORE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt; ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;series&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;x&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt;=time &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;y&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt;=SCORE1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;series&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;x&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt;=time &lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;y&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt;=SCORE2/&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;y2axis&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;xaxis&lt;/SPAN&gt; &lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: purple; font-size: 14pt;"&gt;'time'&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 14pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you ever want to do this when the ID variable is not already sorted, you will need to call PROC SORT first to sort the data by the ID variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this isn't what you want, you can also use the WHERE statement as the first line of the PROC. For example,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: blue; font-size: 14pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 14pt;"&gt; ID=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 19:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31461#M1011</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-01-17T19:00:04Z</dc:date>
    </item>
    <item>
      <title>help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31462#M1012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there any reason you cannot use the "BY" statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=SCORE;&lt;/P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;by id;&lt;BR /&gt;series x=time y=SCORE1;&lt;BR /&gt;series x=time y=SCORE2/y2axis;&lt;BR /&gt;xaxis label='time';&lt;BR /&gt;yaxis label='SCORE1';&lt;BR /&gt;y2axis label='SCORE2';&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 19:02:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31462#M1012</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2012-01-17T19:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31463#M1013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have SAS 9.2 and want to make box plot with groups. Something like the below code that works very well on 9.3:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;title&lt;/SPAN&gt; &lt;SPAN style="color: #a020f0;"&gt;'Cholesterol by Death Cause'&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;proc sgplot&lt;/SPAN&gt; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;=heart;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vbox cholesterol / category=deathcause &lt;SPAN style="color: #0000ff;"&gt;group&lt;/SPAN&gt;=sex clusterwidth=&lt;SPAN style="color: #2e8b57; font-weight: bold;"&gt;0.5&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis &lt;SPAN style="color: #0000ff;"&gt;display&lt;/SPAN&gt;=&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;nolabel&lt;SPAN style="color: #66cc66;"&gt;)&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a work around for the above in 9.2 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 23:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31463#M1013</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2012-04-30T23:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31464#M1014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To "simulate" the group behavior in SAS 9.2, you can use proc SGPANEL.&amp;nbsp; You can get most of the graph, except the coloring of the groups:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="BoxPanel.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/1963_BoxPanel.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let gpath='C:\';&lt;BR /&gt;%let dpi=100;&lt;BR /&gt;ods listing style=htmlblue gpath = &amp;amp;gpath image_dpi=&amp;amp;dpi;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*--Use smaller strings for Death Cause and Sex--*/&lt;/P&gt;&lt;P&gt;data heart;&lt;BR /&gt;&amp;nbsp; set sashelp.heart;&lt;BR /&gt;&amp;nbsp; if (findw(deathcause, 'Cerebral')) then deathcause='CVD';&lt;BR /&gt;&amp;nbsp; if (findw(deathcause, 'Coronary'))&amp;nbsp; then deathcause='CHD';&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (findw(sex, 'Female')) then sex='F';&lt;BR /&gt;&amp;nbsp; if (findw(sex, 'Male')) then sex='M';&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*--Use SGPANEL to create a paneled graph that looks like a grouped box plot--*/&lt;/P&gt;&lt;P&gt;title 'Cholesterol by Death Cause and Sex';&lt;BR /&gt;ods graphics / reset width=5in height=3in imagename='BoxPanel';&lt;BR /&gt;proc sgpanel data=heart;&lt;BR /&gt; panelby deathcause / layout=columnlattice onepanel noborder colheaderpos=bottom novarname; &lt;BR /&gt; vbox cholesterol / category=sex;&lt;BR /&gt; colaxis display=(nolabel);&lt;BR /&gt; rowaxis grid;&lt;BR /&gt; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2012 02:02:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31464#M1014</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2012-05-01T02:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31465#M1015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sanjay for the prompt help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2012 17:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31465#M1015</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2012-05-01T17:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31466#M1016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, there are multiple ways to do this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;With SAS 9.3, you can use GROUPDISPLAY=Cluster with scatter plots too.&amp;nbsp; This is the easiest and most scalable.&amp;nbsp; See &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2012/04/23/sas-global-forum-monday-update/"&gt;blog article with&amp;nbsp; Mean Change plot&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;With SAS 9.2, if your data is in multi-column format (one column for each treatment), you can use DiscreteOffset in GTL.&amp;nbsp; See my &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2011/11/10/it-pays-to-be-discrete/"&gt;blog article on DiscreteOffsets&lt;/A&gt;.&amp;nbsp; This will work for multiple treatments.&lt;/LI&gt;&lt;LI&gt;With SAS 9.2 SGPLOT, you can use axis offsets if you have only two treatments to acheive the separation.&amp;nbsp; Map one treatment to X axis, other to X2, and then use a small offset on X2.&amp;nbsp; It will separate the two markers, thought one will be slightly off center.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 21:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31466#M1016</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2012-05-02T21:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31467#M1017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sanjay for the quick reply. I did some data manipulation and the attached graph. But, I am not sure how to reduce the space b/w the two tick marks i.e. red and the blue should be together as they both belong to the same dose group. Can you guide me please? Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="5-2-2012 1-48-31 PM.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/1965_5-2-2012 1-48-31 PM.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 21:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31467#M1017</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2012-05-02T21:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31468#M1018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please attach program with data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 21:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31468#M1018</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2012-05-02T21:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31469#M1019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the dummy data. Basically I want the two study groups to display side by side...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input dose $ study $ value;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;0.1mg/kg s1 10&lt;/P&gt;&lt;P&gt;0.1mg/kg s2 20&lt;/P&gt;&lt;P&gt;0.2mg/kg s1 30&lt;/P&gt;&lt;P&gt;0.2mg/kg s2 40&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data test1;&lt;/P&gt;&lt;P&gt;set test;&lt;/P&gt;&lt;P&gt;if study="s1" and dose ="0.1mg/kg" then d1=1;&lt;/P&gt;&lt;P&gt;if study="s2" and dose ="0.1mg/kg" then d1=2;&lt;/P&gt;&lt;P&gt;if study="s1" and dose ="0.2mg/kg" then d1=3;&lt;/P&gt;&lt;P&gt;if study="s2" and dose ="0.2mg/kg" then d1=4;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;symbol1 v=dot c= blue ;&lt;/P&gt;&lt;P&gt;symbol2 v=dot c=red;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gplot data = test1 ;&lt;/P&gt;&lt;P&gt;plot value*d1=study/;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 21:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31469#M1019</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2012-05-02T21:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31470#M1020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nThis is GPLOT code, not SGPLOT.&amp;nbsp; I assume you have SAS 9.2. Here is the quick way using SGPLOT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Dosage.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/1968_Dosage.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input Dose $ DrugA DrugB;&lt;BR /&gt;datalines;&lt;BR /&gt;0.1mg/kg 10&amp;nbsp; 20&lt;BR /&gt;0.2mg/kg 30&amp;nbsp; 40&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%let gpath='C:\Work\Blogs\Communities\images';&lt;BR /&gt;ods listing image_dpi=200 gpath=&amp;amp;gpath;&lt;BR /&gt;ods graphics / reset width=3in height=2in imagename='Dosage';&lt;BR /&gt;title 'Response by Dosage and Treatment';&lt;BR /&gt;proc sgplot data=test;&lt;BR /&gt;&amp;nbsp; scatter x=dose y=DrugA;&lt;BR /&gt;&amp;nbsp; scatter x=dose y=DrugB / x2axis;&lt;BR /&gt;&amp;nbsp; yaxis display=(nolabel);&lt;BR /&gt;&amp;nbsp; xaxis offsetmin=0.2 offsetmax=0.18;&lt;BR /&gt;&amp;nbsp; x2axis offsetmin=0.18 offsetmax=0.2 display=none;&lt;BR /&gt;&amp;nbsp; keylegend / location=inside position=topleft across=1;&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To place each marker equally on each side of the tick mark you need to use SAS 9.2&amp;nbsp; GTL. or SAS 9.3 SGPLOT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sanjay Matange - Moved the legend position&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 22:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31470#M1020</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2012-05-02T22:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31471#M1021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a modification of your gplot code, that also creates the side-by-side plot...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input dose $ study $ value;&lt;BR /&gt;datalines;&lt;BR /&gt;0.1mg/kg s1 10&lt;BR /&gt;0.1mg/kg s2 20&lt;BR /&gt;0.2mg/kg s1 30&lt;BR /&gt;0.2mg/kg s2 40&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Convert dose into numeric x_var */&lt;BR /&gt;proc sort data=test out=test;&lt;BR /&gt;by dose;&lt;BR /&gt;run;&lt;BR /&gt;data test; set test;&lt;BR /&gt;label x_var='Dose';&lt;BR /&gt;by dose;&lt;BR /&gt;if first.dose then x_var+1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Create user-defined format, so numeric x_var prints as text value */&lt;BR /&gt;proc sql noprint;&lt;BR /&gt;create table foo as select unique x_var, dose from test;&lt;BR /&gt;select max(x_var)+1 into :max from test;&lt;BR /&gt;quit; run;&lt;BR /&gt;data control; set foo (rename = ( x_var=start dose=label));&lt;BR /&gt;fmtname = 'myfmt';&lt;BR /&gt;type = 'N';&lt;BR /&gt;end = START;&lt;BR /&gt;run;&lt;BR /&gt;proc format lib=work cntlin=control;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* move the values (colored dots) a little to the left and right */&lt;BR /&gt;data test; set test;&lt;BR /&gt;if study='s1' then x_var=x_var-.05;&lt;BR /&gt;if study='s2' then x_var=x_var+.05;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;axis1 minor=none order=(0 to 50 by 10) offset=(0,0);&lt;BR /&gt;axis2 minor=none order=(0 to &amp;amp;max by 1) offset=(0,0)&lt;BR /&gt; value=(t=1 '' t=&amp;amp;max '') /* blank out the 0 and n+1 labels */&lt;BR /&gt; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;legend1 position=(top left inside) repeat=1 cborder=black;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;symbol1 v=circle h=3 c=blue ;&lt;BR /&gt;symbol2 v=circle h=3 c=red;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;title1 "Custom SAS/Graph with side-by-side markers";&lt;BR /&gt;proc gplot data=test;&lt;BR /&gt;format x_var myfmt.;&amp;nbsp; /* apply the user-defined format */&lt;BR /&gt;plot value*x_var=study /&lt;BR /&gt; vaxis=axis1 haxis=axis2&lt;BR /&gt; autohref chref=graydd&lt;BR /&gt; autovref cvref=graydd&lt;BR /&gt; vzero&lt;BR /&gt; legend=legend1;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 12:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31471#M1021</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2012-05-03T12:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: help on SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31472#M1022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert for your help. My code is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2012 04:20:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/help-on-SGPLOT/m-p/31472#M1022</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2012-05-04T04:20:00Z</dc:date>
    </item>
  </channel>
</rss>

