<?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: Axis size and legend label in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/473328#M16359</link>
    <description>&lt;P&gt;I think this is what you're looking for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data means;&lt;BR /&gt;input Month Hour Mean;&lt;BR /&gt;datalines;&lt;BR /&gt;1 1 5&lt;BR /&gt;1 2 4&lt;BR /&gt;1 3 3.5&lt;BR /&gt;1 4 4&lt;BR /&gt;1 5 5&lt;BR /&gt;1 6 6&lt;BR /&gt;1 7 7&lt;BR /&gt;1 8 8&lt;BR /&gt;1 9 9&lt;BR /&gt;1 10 10&lt;BR /&gt;1 11 11&lt;BR /&gt;1 12 12&lt;BR /&gt;1 13 13&lt;BR /&gt;1 14 14&lt;BR /&gt;1 15 14.5&lt;BR /&gt;1 16 14&lt;BR /&gt;1 17 13&lt;BR /&gt;1 18 12&lt;BR /&gt;1 19 11&lt;BR /&gt;1 20 10.5&lt;BR /&gt;1 21 11&lt;BR /&gt;1 22 12&lt;BR /&gt;1 23 13&lt;BR /&gt;1 24 14&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;axis1 order=(0 to 20 by 5) minor=none offset=(0,0);&lt;BR /&gt;axis2 order=(0 to 24 by 6) minor=none offset=(0,0);&lt;BR /&gt;legend1 repeat=2 value=(justify=left);&lt;/P&gt;
&lt;P&gt;proc format;&lt;BR /&gt; value monfmt&lt;BR /&gt; 1='Jan'&lt;BR /&gt; 2='Feb'&lt;BR /&gt; 3='Mar'&lt;BR /&gt; 4='Apr'&lt;BR /&gt; 5='May'&lt;BR /&gt; 6='Jun'&lt;BR /&gt; 7='Jul'&lt;BR /&gt; 8='Aug'&lt;BR /&gt; 9='Sep'&lt;BR /&gt; 10='Oct'&lt;BR /&gt; 11='Nov'&lt;BR /&gt; 12='Dec'&lt;BR /&gt; ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;symbol1 i=join value=W font=marker c=red h=1 line=1 width=1;&lt;/P&gt;
&lt;P&gt;proc gplot data = means;&lt;BR /&gt; plot mean*Hour=Month / vaxis=axis1 haxis=axis2 &lt;BR /&gt; noframe legend=legend1&lt;BR /&gt; autohref chref=graydd&lt;BR /&gt; autovref cvref=graydd;&lt;BR /&gt; format Month monfmt.;&lt;BR /&gt;run;&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-inline" image-alt="monthplot.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21391i06A1B42C426FBBAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="monthplot.png" alt="monthplot.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jun 2018 11:54:38 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2018-06-26T11:54:38Z</dc:date>
    <item>
      <title>Axis size and legend label</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/472494#M16324</link>
      <description>&lt;P&gt;Hi. I would like to change the X-axis to 0-24 as well as the legend from '1' to 'January' etc.&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;PRE&gt;proc sort data = matt;
 by Month Hour;
run;

proc summary data = matt;
 by Month Hour;
 var Load;
 output out = means (drop = _:) mean = mean n = n stderr = stderr;
run;

symbol1 i = j value = W font = marker c = vivb h = 1 line = 1 width = 1;
symbol2 i = j value = W font = marker c = bigb h = 1 line = 1 width = 1; 
symbol3 i = j value = W font = marker c = liolbr h = 1 line = 1 width = 1;
symbol4 i = j value = W font = marker c = lilg h = 1 line = 1 width = 1; 
symbol5 i = j value = W font = marker c = vilg h = 1 line = 1 width = 1;
symbol6 i = j value = W font = marker c = salmon h = 1 line = 1 width = 1; 
symbol7 i = j value = W font = marker c = vipk h = 1 line = 1 width = 1;
symbol8 i = j value = W font = marker c = lippk h = 1 line = 1 width = 1; 
symbol9 i = j value = W font = marker c = strbr h = 1 line = 1 width = 1;
symbol10 i = j value = W font = marker c = morbr h = 1 line = 1 width = 1; 
symbol11 i = j value = W font = marker c = debr h = 1 line = 1 width = 1;
symbol12 i = j value = W font = marker c = bib h = 1 line = 1 width = 1; 

proc gplot data = means;
 plot mean * Hour = Month;
 format Month;
run; &lt;/PRE&gt;&lt;P&gt;and here's how it looks now:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-22 at 10.05.21 AM.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21335iE7F917FF64E277A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-06-22 at 10.05.21 AM.png" alt="Screen Shot 2018-06-22 at 10.05.21 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 14:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/472494#M16324</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-06-22T14:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Axis size and legend label</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/472498#M16325</link>
      <description>&lt;P&gt;Your not applying any format to month with:&lt;/P&gt;
&lt;PRE&gt; format Month;&lt;/PRE&gt;
&lt;P&gt;Maybe:&lt;BR /&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt; format Month monname.;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;As for changing an axis, afraid I haven't used gplot in years.&amp;nbsp; I would advise to move to sgplot and gtl, far more advanced, and customisable.&amp;nbsp; Check here for examples:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 14:29:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/472498#M16325</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-22T14:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Axis size and legend label</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/472511#M16326</link>
      <description>&lt;P&gt;if you must use Proc Gplot then the appearance of Axis values is controlled by an Axis statement.&lt;/P&gt;
&lt;P&gt;To select values use an ORDER= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Axis1 order= (1 to 24 by 1);&lt;/P&gt;
&lt;P&gt;the "by" values can be date or time intervals for date, time or datetime values when you have those.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can have up to 99 axis statements active at one time similar to symbol statements, so use 1 to 99 to indicate which statement is used.&lt;/P&gt;
&lt;P&gt;Then in the procedure you associate an axis definition with the role such as haxis=axis1 as an option to the plot statement where you want it to apply:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc gplot data = means;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; plot mean * Hour = Month /&amp;nbsp; haxis=axis1;&lt;BR /&gt; format Month &amp;lt;your format name goes here&amp;gt;.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 15:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/472511#M16326</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-22T15:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Axis size and legend label</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/473328#M16359</link>
      <description>&lt;P&gt;I think this is what you're looking for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data means;&lt;BR /&gt;input Month Hour Mean;&lt;BR /&gt;datalines;&lt;BR /&gt;1 1 5&lt;BR /&gt;1 2 4&lt;BR /&gt;1 3 3.5&lt;BR /&gt;1 4 4&lt;BR /&gt;1 5 5&lt;BR /&gt;1 6 6&lt;BR /&gt;1 7 7&lt;BR /&gt;1 8 8&lt;BR /&gt;1 9 9&lt;BR /&gt;1 10 10&lt;BR /&gt;1 11 11&lt;BR /&gt;1 12 12&lt;BR /&gt;1 13 13&lt;BR /&gt;1 14 14&lt;BR /&gt;1 15 14.5&lt;BR /&gt;1 16 14&lt;BR /&gt;1 17 13&lt;BR /&gt;1 18 12&lt;BR /&gt;1 19 11&lt;BR /&gt;1 20 10.5&lt;BR /&gt;1 21 11&lt;BR /&gt;1 22 12&lt;BR /&gt;1 23 13&lt;BR /&gt;1 24 14&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;axis1 order=(0 to 20 by 5) minor=none offset=(0,0);&lt;BR /&gt;axis2 order=(0 to 24 by 6) minor=none offset=(0,0);&lt;BR /&gt;legend1 repeat=2 value=(justify=left);&lt;/P&gt;
&lt;P&gt;proc format;&lt;BR /&gt; value monfmt&lt;BR /&gt; 1='Jan'&lt;BR /&gt; 2='Feb'&lt;BR /&gt; 3='Mar'&lt;BR /&gt; 4='Apr'&lt;BR /&gt; 5='May'&lt;BR /&gt; 6='Jun'&lt;BR /&gt; 7='Jul'&lt;BR /&gt; 8='Aug'&lt;BR /&gt; 9='Sep'&lt;BR /&gt; 10='Oct'&lt;BR /&gt; 11='Nov'&lt;BR /&gt; 12='Dec'&lt;BR /&gt; ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;symbol1 i=join value=W font=marker c=red h=1 line=1 width=1;&lt;/P&gt;
&lt;P&gt;proc gplot data = means;&lt;BR /&gt; plot mean*Hour=Month / vaxis=axis1 haxis=axis2 &lt;BR /&gt; noframe legend=legend1&lt;BR /&gt; autohref chref=graydd&lt;BR /&gt; autovref cvref=graydd;&lt;BR /&gt; format Month monfmt.;&lt;BR /&gt;run;&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-inline" image-alt="monthplot.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21391i06A1B42C426FBBAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="monthplot.png" alt="monthplot.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 11:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Axis-size-and-legend-label/m-p/473328#M16359</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2018-06-26T11:54:38Z</dc:date>
    </item>
  </channel>
</rss>

