<?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: Monthly Box Plot in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Monthly-Box-Plot/m-p/471763#M30593</link>
    <description>&lt;P&gt;Since the values you display for the "day" axis are extremely unlikely given the "example data" , carefully edited to remove the data set name hiding the fact that you are plotting from a different data set where you have likely done some thing with the day an month variable we can't recreate what you have done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very likely you have created a character variable and then the "date" of 01Apr would be followed by 01Aug in sort order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint: To have date related items sort in order then use actual DATE values. If you are looking for the spread of values for a given calendar day across years then assign the same year to all of the values and then use a date format to display the bit you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your data step where you combined the day and month use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date = mdy(month, day, 1960);&lt;/P&gt;
&lt;P&gt;format date date5. ; to show the date as ddMON&lt;/P&gt;
&lt;P&gt;and then use the DATE variable for the x-axis variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also is the "error" in the display or an actual SAS error message?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jun 2018 16:07:30 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-06-20T16:07:30Z</dc:date>
    <item>
      <title>Monthly Box Plot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Monthly-Box-Plot/m-p/471751#M30590</link>
      <description>&lt;P&gt;&amp;nbsp;Hi, I have a dataset with over 80,000 observations and I want to make a monthly box plot but get an error that the data isn't in order.&lt;/P&gt;&lt;P&gt;I want it to look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-20 at 11.39.18 AM.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21289i545EC3A8F782259F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-06-20 at 11.39.18 AM.png" alt="Screen Shot 2018-06-20 at 11.39.18 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used this code:&lt;/P&gt;&lt;PRE&gt;proc boxplot data=dataname;
plot Load*Month;
run;&lt;/PRE&gt;&lt;P&gt;And here's how some of the data looks like and goes on for years:&lt;/P&gt;&lt;PRE&gt;input load day month temperature
datalines:
12345 0 12 35
12456 1 12 33
12222 2 12 32
14532 3 12 31
15111 4 12 25
15222 5 12 24
15333 6 12 33
;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jun 2018 15:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Monthly-Box-Plot/m-p/471751#M30590</guid>
      <dc:creator>matt23</dc:creator>
      <dc:date>2018-06-20T15:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly Box Plot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Monthly-Box-Plot/m-p/471763#M30593</link>
      <description>&lt;P&gt;Since the values you display for the "day" axis are extremely unlikely given the "example data" , carefully edited to remove the data set name hiding the fact that you are plotting from a different data set where you have likely done some thing with the day an month variable we can't recreate what you have done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very likely you have created a character variable and then the "date" of 01Apr would be followed by 01Aug in sort order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint: To have date related items sort in order then use actual DATE values. If you are looking for the spread of values for a given calendar day across years then assign the same year to all of the values and then use a date format to display the bit you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your data step where you combined the day and month use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date = mdy(month, day, 1960);&lt;/P&gt;
&lt;P&gt;format date date5. ; to show the date as ddMON&lt;/P&gt;
&lt;P&gt;and then use the DATE variable for the x-axis variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also is the "error" in the display or an actual SAS error message?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 16:07:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Monthly-Box-Plot/m-p/471763#M30593</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-20T16:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly Box Plot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Monthly-Box-Plot/m-p/471764#M30594</link>
      <description>&lt;P&gt;The data step code you're trying to post is incomplete (in several posts now).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding a PROC SORT to see if sorting the data fixes the issue. You should also consider switching to SGPLOT - better control of your graphics and higher quality graphs in general.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have;
by month;
run;

proc boxplot data=have;
plot load*month;
run;

proc sgplot data=have;
vbox load / category=month;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216327"&gt;@matt23&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;Hi, I have a dataset with over 80,000 observations and I want to make a monthly box plot but get an error that the data isn't in order.&lt;/P&gt;
&lt;P&gt;I want it to look like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-06-20 at 11.39.18 AM.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21289i545EC3A8F782259F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-06-20 at 11.39.18 AM.png" alt="Screen Shot 2018-06-20 at 11.39.18 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used this code:&lt;/P&gt;
&lt;PRE&gt;proc boxplot data=dataname;
plot Load*Month;
run;&lt;/PRE&gt;
&lt;P&gt;And here's how some of the data looks like and goes on for years:&lt;/P&gt;
&lt;PRE&gt;input load day month temperature
datalines:
12345 0 12 35
12456 1 12 33
12222 2 12 32
14532 3 12 31
15111 4 12 25
15222 5 12 24
15333 6 12 33
;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 16:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Monthly-Box-Plot/m-p/471764#M30594</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-20T16:07:40Z</dc:date>
    </item>
  </channel>
</rss>

