<?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: How do I format x axis values in proc sgplot? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472619#M16335</link>
    <description>&lt;P&gt;1) don't see a FORMAT statement in the Proc SGPLOT/ SGPANEL code.&lt;/P&gt;
&lt;P&gt;If the format is not permanently associated with the variable you need a statement such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Format time &amp;lt;formatname.&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) We would likely need to see actual values of X and your format definition to diagnose anything further.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jun 2018 22:05:21 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-06-22T22:05:21Z</dc:date>
    <item>
      <title>How do I format x axis values in proc sgplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472585#M16332</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a graph where the x axis will be time CD4 count was measured (before diagnosis, at diagnosis, 2 months after diagnosis, 4 month after diagnosis, 8 months after diagnosis and 10 months after diagnosis) and y axis will be the CD4 count. I want to label the grid values so that I can see: "before diagnosis", "2 months", "4 months" and so on on the x-axis. The partial code I want to use is below. How do I achieve the formatting of the "Time of CD4 measurement" values in the graph?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=one;&lt;/P&gt;&lt;P&gt;panelby state;&lt;/P&gt;&lt;P&gt;refline 0/ axis=x lineattrs=(color= red pattern=2);&lt;/P&gt;&lt;P&gt;series x=time y=CD4_count lineattrs=(color=gray pattern=1 thickness=1);&lt;/P&gt;&lt;P&gt;colaxis label= "Time of&amp;nbsp;CD4 measurement" grid values= (0 to 10 by 1);&lt;/P&gt;&lt;P&gt;rowaxis label= "CD4_count"; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any help you can offer&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 19:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472585#M16332</guid>
      <dc:creator>lousam</dc:creator>
      <dc:date>2018-06-22T19:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I format x axis values in proc sgplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472594#M16333</link>
      <description>&lt;P&gt;A user defined format&amp;nbsp;works fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming you had used numbers instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value time_measure_fmt
 1 = 'Before'
2  = 'At'
3 = 'After';
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then apply it in SGPLOT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format time time_measure_fmt.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/178536"&gt;@lousam&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a graph where the x axis will be time CD4 count was measured (before diagnosis, at diagnosis, 2 months after diagnosis, 4 month after diagnosis, 8 months after diagnosis and 10 months after diagnosis) and y axis will be the CD4 count. I want to label the grid values so that I can see: "before diagnosis", "2 months", "4 months" and so on on the x-axis. The partial code I want to use is below. How do I achieve the formatting of the "Time of CD4 measurement" values in the graph?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=one;&lt;/P&gt;
&lt;P&gt;panelby state;&lt;/P&gt;
&lt;P&gt;refline 0/ axis=x lineattrs=(color= red pattern=2);&lt;/P&gt;
&lt;P&gt;series x=time y=CD4_count lineattrs=(color=gray pattern=1 thickness=1);&lt;/P&gt;
&lt;P&gt;colaxis label= "Time of&amp;nbsp;CD4 measurement" grid values= (0 to 10 by 1);&lt;/P&gt;
&lt;P&gt;rowaxis label= "CD4_count"; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate any help you can offer&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 20:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472594#M16333</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-22T20:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I format x axis values in proc sgplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472609#M16334</link>
      <description>&lt;P&gt;Thank you. Sorry, I made a mistake I meant to use&amp;nbsp;procsgpanel in my question. I am using a macro where my data set varies (4 data sets total) but the variables and the code remains the same as the one I listed in the previous question. For some reason using the format statement isn't working (can't see the formatted time values). Thank you again&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 20:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472609#M16334</guid>
      <dc:creator>lousam</dc:creator>
      <dc:date>2018-06-22T20:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I format x axis values in proc sgplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472619#M16335</link>
      <description>&lt;P&gt;1) don't see a FORMAT statement in the Proc SGPLOT/ SGPANEL code.&lt;/P&gt;
&lt;P&gt;If the format is not permanently associated with the variable you need a statement such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Format time &amp;lt;formatname.&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) We would likely need to see actual values of X and your format definition to diagnose anything further.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 22:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-format-x-axis-values-in-proc-sgplot/m-p/472619#M16335</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-22T22:05:21Z</dc:date>
    </item>
  </channel>
</rss>

