<?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: SGPLOT, uneven tick on x-axis in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85887#M3171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This little example should work for you. Let me know if you have any questions about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mydata;&lt;/P&gt;&lt;P&gt;input x y;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;8 19&lt;/P&gt;&lt;P&gt;15 38.8&lt;/P&gt;&lt;P&gt;22 30.6&lt;/P&gt;&lt;P&gt;28 31&lt;/P&gt;&lt;P&gt;29 34.1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data null;&lt;/P&gt;&lt;P&gt;set mydata end=eof;&lt;/P&gt;&lt;P&gt;call symput('val'||left(trim(_n_)), trim(left(x)));&lt;/P&gt;&lt;P&gt;if eof then call symput('tot',trim(left(_n_)));&lt;/P&gt;&lt;P&gt;run&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro value;&lt;/P&gt;&lt;P&gt;%do i= 1 %to &amp;amp;tot;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;&amp;amp;val&amp;amp;i&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend value;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=mydata; by x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=mydata noautolegend;&lt;/P&gt;&lt;P&gt;xaxis values=(%value);&lt;/P&gt;&lt;P&gt;needle y=y x=x;&lt;/P&gt;&lt;P&gt;series y=y x=x;&lt;/P&gt;&lt;P&gt;run&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Mar 2013 15:42:18 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2013-03-22T15:42:18Z</dc:date>
    <item>
      <title>SGPLOT, uneven tick on x-axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85886#M3170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use SGPLOT to plot a uneven tick on x-axis in a proportional space but show all x value (see data below). how to do it?&amp;nbsp; highly appreciate it for any suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x y&lt;/P&gt;&lt;P&gt;8 19&lt;/P&gt;&lt;P&gt;15 38.8&lt;/P&gt;&lt;P&gt;22 30.6&lt;/P&gt;&lt;P&gt;28 31&lt;/P&gt;&lt;P&gt;29 34.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!!&lt;/P&gt;&lt;P&gt;Muyi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 15:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85886#M3170</guid>
      <dc:creator>muyi</dc:creator>
      <dc:date>2013-03-22T15:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT, uneven tick on x-axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85887#M3171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This little example should work for you. Let me know if you have any questions about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mydata;&lt;/P&gt;&lt;P&gt;input x y;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;8 19&lt;/P&gt;&lt;P&gt;15 38.8&lt;/P&gt;&lt;P&gt;22 30.6&lt;/P&gt;&lt;P&gt;28 31&lt;/P&gt;&lt;P&gt;29 34.1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data null;&lt;/P&gt;&lt;P&gt;set mydata end=eof;&lt;/P&gt;&lt;P&gt;call symput('val'||left(trim(_n_)), trim(left(x)));&lt;/P&gt;&lt;P&gt;if eof then call symput('tot',trim(left(_n_)));&lt;/P&gt;&lt;P&gt;run&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro value;&lt;/P&gt;&lt;P&gt;%do i= 1 %to &amp;amp;tot;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;&amp;amp;val&amp;amp;i&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend value;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=mydata; by x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=mydata noautolegend;&lt;/P&gt;&lt;P&gt;xaxis values=(%value);&lt;/P&gt;&lt;P&gt;needle y=y x=x;&lt;/P&gt;&lt;P&gt;series y=y x=x;&lt;/P&gt;&lt;P&gt;run&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 15:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85887#M3171</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2013-03-22T15:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT, uneven tick on x-axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85888#M3172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would be tempted to replace the macro and the DATA step with a SQL step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;select distinct x&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; into :values separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from mydata;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the XAXIS statement becomes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xaxis values=(&amp;amp;values);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan the order of the values in the XAXIS statement does not seem to matter (I never noticed this before).&amp;nbsp; Are there any issues with the values not being in order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Art Carpenter&#xD;
I left off the separated by phrase - added now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Mar 2013 06:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85888#M3172</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2013-03-24T06:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT, uneven tick on x-axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85889#M3173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IArt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the DISTINCT impose order?&lt;/P&gt;&lt;P&gt;If not, muyi could extend the sql like:&lt;/P&gt;&lt;P&gt;Proc sql ;&lt;/P&gt;&lt;P&gt;Select distinct x &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Into :values separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp; from myData&lt;/P&gt;&lt;P&gt;&amp;nbsp; ORDER BY x ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peterC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Peter Crawford&#xD;
&#xD;
Perhaps I should show the whole&amp;nbsp; sql step&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Mar 2013 08:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85889#M3173</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-03-24T08:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT, uneven tick on x-axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85890#M3174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;Yes the DISTINCT does imply order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 01:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-uneven-tick-on-x-axis/m-p/85890#M3174</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2013-03-25T01:57:35Z</dc:date>
    </item>
  </channel>
</rss>

