<?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: Setting the origin (axis crossing) in sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365099#M12703</link>
    <description>&lt;P&gt;Cartesean axes are supported in GTL. &amp;nbsp;You can use the ORIGIN option in the LINEAROPTS of the XAXISOPTS and YAXISOPTS. &amp;nbsp;This is not supported in SGPLOT. &amp;nbsp;You can use the TMPLOUT option on the SGPLOT procedure to write out the GTL generated by the SGPLOT procedure for your code. &amp;nbsp;Then, you can read in the GTL, and add the ORIGIN= optiion in the XAXISOPTS and YAXISOPTS bundles to get what you want.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2017 17:14:55 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2017-06-07T17:14:55Z</dc:date>
    <item>
      <title>Setting the origin (axis crossing) in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365058#M12700</link>
      <description>&lt;P&gt;I'm trying to generate a scatter plot inwhich I can set the axis crossing point.&amp;nbsp; The code I've tried so far is:&lt;/P&gt;&lt;P&gt;proc sgplot data=pi.LdIcuHospState;&lt;BR /&gt;where groupid=1 and year(edarrivaldate)=2015 and FacilityIDo ne "State";&lt;BR /&gt;title '2015 Survival Group 1';&lt;BR /&gt;scatter x=IssAvg_Ldr y=LiveDieAvgr&amp;nbsp; / group=FacilityIdo xorigin=&amp;amp;y_LD_Avg yorigin=&amp;amp;y_LD_Avg;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But - I get an error message when I use the xorigin and yorigin statements.&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, ATTRID, CLUSTERWIDTH, COLORMODEL,&lt;BR /&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; COLORRESPONSE, DATALABEL, DATALABELATTRS, DATALABELPOS, DATASKIN, DISCRETEOFFSET,&lt;BR /&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; ERRORBARATTRS, FILLEDOUTLINEDMARKERS, FREQ, GROUP, GROUPDISPLAY, GROUPORDER,&lt;BR /&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; JITTER, JITTERWIDTH, LABELSTRIP, LEGENDLABEL, MARKERATTRS, MARKERCHAR,&lt;BR /&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; MARKERCHARATTRS, MARKERFILLATTRS, MARKEROUTLINEATTRS, NAME, NOERRORCAPS,&lt;BR /&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; NOMISSINGGROUP, RATTRID, SPLITCHAR, SPLITCHARNODROP, SPLITJUSTIFY, TIP, TIPFORMAT,&lt;BR /&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; TIPLABEL, TRANSPARENCY, URL, X2AXIS, XERRORLOWER, XERRORUPPER, Y2AXIS, YERRORLOWER,&lt;BR /&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; YERRORUPPER.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like the output graph to look like the picture below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9254i838D0E97E002018D/image-size/original?v=1.0&amp;amp;px=-1" alt="GraphPicture2.jpg" title="GraphPicture2.jpg" height="291" border="0" width="530" /&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggestions?&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 15:51:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365058#M12700</guid>
      <dc:creator>sschiro</dc:creator>
      <dc:date>2017-06-07T15:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the origin (axis crossing) in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365086#M12701</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/69716/HTML/default/viewer.htm#p1lcbd3lhs3t3bn1jk6d8sjt2yqx.htm" target="_self"&gt;The documentation of the SCATTER statement is here.&lt;/A&gt;&amp;nbsp;Notice there are no XORIGIN or YORIGIN&amp;nbsp;statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you propose is not simple to do. &amp;nbsp;When I want to indicate an average value or some other reference value, I use the&amp;nbsp;REFLINE statement to add vertical and horizontal reference lines, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x_ave =  62.3;
%let y_ave = 100;

proc sgplot data=sashelp.class;
format Name $2.;
scatter x=Height y=Weight / datalabel=Name;
refline &amp;amp;x_ave / axis=x;
refline &amp;amp;y_ave / axis=y;
xaxis grid;
yaxis grid;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jun 2017 16:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365086#M12701</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-07T16:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the origin (axis crossing) in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365098#M12702</link>
      <description>&lt;P&gt;It is possible to do this using GTL; however, if you want to stick with the SG procedures, I agree with RIck that using REFLINEs can give you a good display of this information. It also keeps the tick values out of the way of the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://drummer.unx.sas.com:60253/results/sastmp/SAS_work1A6000007D13_drummer/SGPlot6.png" border="0" alt="The SGPlot Procedure" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x_avg=13.4;
%let y_avg=61.2;

proc sgplot data=sashelp.class noborder;
xaxis display=(noticks noline) grid;
yaxis display=(noticks noline) grid;
refline &amp;amp;x_avg / axis=x lineattrs=(thickness=3) label;
refline &amp;amp;y_avg / lineattrs=(thickness=3) label;
scatter x=age y=height / datalabel
        markerattrs=(symbol=circlefilled);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jun 2017 17:14:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365098#M12702</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-06-07T17:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the origin (axis crossing) in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365099#M12703</link>
      <description>&lt;P&gt;Cartesean axes are supported in GTL. &amp;nbsp;You can use the ORIGIN option in the LINEAROPTS of the XAXISOPTS and YAXISOPTS. &amp;nbsp;This is not supported in SGPLOT. &amp;nbsp;You can use the TMPLOUT option on the SGPLOT procedure to write out the GTL generated by the SGPLOT procedure for your code. &amp;nbsp;Then, you can read in the GTL, and add the ORIGIN= optiion in the XAXISOPTS and YAXISOPTS bundles to get what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 17:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365099#M12703</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-06-07T17:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the origin (axis crossing) in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365128#M12705</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 18:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Setting-the-origin-axis-crossing-in-sgplot/m-p/365128#M12705</guid>
      <dc:creator>sschiro</dc:creator>
      <dc:date>2017-06-07T18:19:53Z</dc:date>
    </item>
  </channel>
</rss>

