<?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 BOX Plot on a non discrete axis in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/BOX-Plot-on-a-non-discrete-axis/m-p/46403#M1571</link>
    <description>Is it possible to create box plots in ODS graphics on a linear scaled axis instead of a categorical? I want to have a time axis and a box per group, with jitter to be able to distiguish the boxes. Any help?</description>
    <pubDate>Mon, 25 Jan 2010 13:16:56 GMT</pubDate>
    <dc:creator>asmits</dc:creator>
    <dc:date>2010-01-25T13:16:56Z</dc:date>
    <item>
      <title>BOX Plot on a non discrete axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/BOX-Plot-on-a-non-discrete-axis/m-p/46403#M1571</link>
      <description>Is it possible to create box plots in ODS graphics on a linear scaled axis instead of a categorical? I want to have a time axis and a box per group, with jitter to be able to distiguish the boxes. Any help?</description>
      <pubDate>Mon, 25 Jan 2010 13:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/BOX-Plot-on-a-non-discrete-axis/m-p/46403#M1571</guid>
      <dc:creator>asmits</dc:creator>
      <dc:date>2010-01-25T13:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: BOX Plot on a non discrete axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/BOX-Plot-on-a-non-discrete-axis/m-p/46404#M1572</link>
      <description>Recommended Google advanced search argument:&lt;BR /&gt;
&lt;BR /&gt;
boxplot linear axis site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 25 Jan 2010 17:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/BOX-Plot-on-a-non-discrete-axis/m-p/46404#M1572</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-25T17:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: BOX Plot on a non discrete axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/BOX-Plot-on-a-non-discrete-axis/m-p/46405#M1573</link>
      <description>I have been working on a similar problem. I am creating boxplots for the previous and current year, the past 12 months and the past 4 weeks. The methodology is to create groups and dategroups for each record. The value in the dategroup will be displayed on the axis. First step is to create three datasets for year, month and week. Key is to have the data in each to be sorted by the dategroup to chart properly. From the distinct group and dategrp values a format is created for charting. The program has some macro variables to color the boxplots differently for year, month and week. Read through it and hope it helps.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 data group_year group_month  group_week;&lt;BR /&gt;
    length dategrp $5. group $6.;&lt;BR /&gt;
    set dsnin;&lt;BR /&gt;
     /* current and previous 2 years fall into this group */&lt;BR /&gt;
    if year = year(&amp;amp;current_year_date) then dategrp='YTD';&lt;BR /&gt;
    else dategrp=put(year,4.);&lt;BR /&gt;
    group='Year';&lt;BR /&gt;
    output group_year;&lt;BR /&gt;
    /* last 12 full months - all samples fall into this group */&lt;BR /&gt;
    if os_date ge &amp;amp;prev12_month_date then&lt;BR /&gt;
      do;&lt;BR /&gt;
        if month = &amp;amp;current_month_date then dategrp='MTD';&lt;BR /&gt;
        else dategrp=put(month,monyy5.);&lt;BR /&gt;
        group='Month';&lt;BR /&gt;
        output group_month;&lt;BR /&gt;
      end;&lt;BR /&gt;
    /* last 4 weeks */&lt;BR /&gt;
    if week &amp;gt;= &amp;amp;prev4_week_date then&lt;BR /&gt;
      do;&lt;BR /&gt;
        dategrp=substr(put(week,yymmdd8.),4,5);&lt;BR /&gt;
        group='Week';&lt;BR /&gt;
        output group_week;&lt;BR /&gt;
      end;&lt;BR /&gt;
    label dategrp='Date';&lt;BR /&gt;
  run;&lt;BR /&gt;
&lt;BR /&gt;
  /* Join the data sets together and create the Date index file for the format create       */&lt;BR /&gt;
  /* NOTE: THIS DATASET CONTAINS MORE DATA THAN THE ORIGINAL BECAUSE OF THE OVERLAP IN TIME */&lt;BR /&gt;
  data final&lt;BR /&gt;
      index(keep=dategrpindex dategrp group);&lt;BR /&gt;
      retain dategrpindex ;&lt;BR /&gt;
      set group_year&lt;BR /&gt;
          group_month &lt;BR /&gt;
          group_week;&lt;BR /&gt;
      /* Create a tag color set to group the data by Month, Week */&lt;BR /&gt;
      length boxcolor $8.;&lt;BR /&gt;
      if group='Year' then boxcolor="&amp;amp;mid_light_gray"; /* Blue */&lt;BR /&gt;
      else if group='Month' then boxcolor="&amp;amp;mid_light_blue"; /* Blue */&lt;BR /&gt;
      else /*week*/ boxcolor="&amp;amp;mid_light_rust";          /* rust */&lt;BR /&gt;
      /* Filter the data */&lt;BR /&gt;
      if dategrp ne lag(dategrp) then do;&lt;BR /&gt;
              dategrpindex+1;&lt;BR /&gt;
              output index;&lt;BR /&gt;
      end;&lt;BR /&gt;
      output final;&lt;BR /&gt;
      label dategrpindex='Date';&lt;BR /&gt;
  run;&lt;BR /&gt;
&lt;BR /&gt;
    /*------------------------------------------------------------------*/&lt;BR /&gt;
    /* Create the CNTLIN Dataset to load the format. USE for boxchart   */&lt;BR /&gt;
    Data Load_Date_Scale_format;&lt;BR /&gt;
        retain type 'n';&lt;BR /&gt;
        set index end=endit;&lt;BR /&gt;
        by group notsorted;&lt;BR /&gt;
        fmtname='TimeAxis';&lt;BR /&gt;
        label=dategrp;&lt;BR /&gt;
        start=dategrpindex;&lt;BR /&gt;
        end=dategrpindex;&lt;BR /&gt;
        drop dategrp dategrpindex;&lt;BR /&gt;
        if endit then do;&lt;BR /&gt;
            call symputx('MaxDategrpindex', dategrpindex);&lt;BR /&gt;
        end;&lt;BR /&gt;
        output;&lt;BR /&gt;
    run;&lt;BR /&gt;
&lt;BR /&gt;
    /* Load the Format for the Time Axis Groups */&lt;BR /&gt;
    proc format /*fmtlib*/ cntlin=Load_Date_Scale_format;&lt;BR /&gt;
    run;&lt;BR /&gt;
&lt;BR /&gt;
    goptions reset=all ftitle=duplex htitle=4 ftext=simplex htext=3 device=sasprtc gunit=pct  nodisplay;&lt;BR /&gt;
&lt;BR /&gt;
    /* Define Symbols and Axises */&lt;BR /&gt;
    axis1 order=(0 to 600 by 100) label=(angle=-90 rotate=90 h=2pct) origin = (10pct, 15pct) value=(h=2pct)&lt;BR /&gt;
            offset=(1pct, 1pct) length=70pct;&lt;BR /&gt;
    axis2 label=(h=2pct "Two Years, Last 12 Months, Last 4 Weeks")&lt;BR /&gt;
        order=( 1 to &amp;amp;Maxdategrpindex by 1) value=(h=1pct)&lt;BR /&gt;
        value=(h=1.5pct) offset=(2.5pct, 2.5pct);&lt;BR /&gt;
&lt;BR /&gt;
    /* Provide an BOX and WHISKER analysis across all crews  */&lt;BR /&gt;
    title1 "Caster Tundish Turnaround Time";&lt;BR /&gt;
    footnote1 J=L h=1.5pct "Job ID: SO253_Tundish_Turnaround";&lt;BR /&gt;
    symbol1 v=dot i=none c=&amp;amp;mid_dark_blue;&lt;BR /&gt;
    symbol2 v=none;&lt;BR /&gt;
    proc shewhart data=final gout=work.charts;&lt;BR /&gt;
      boxchart variable*dategrpindex(group) /&lt;BR /&gt;
            cboxfill  = ( boxcolor )&lt;BR /&gt;
            cboxes    = CX000000&lt;BR /&gt;
            cinfill   = CX999999&lt;BR /&gt;
            boxstyle  = schematic&lt;BR /&gt;
            idsymbol  = square&lt;BR /&gt;
            idcolor   = purple&lt;BR /&gt;
            nolegend&lt;BR /&gt;
            vaxis=axis1&lt;BR /&gt;
            haxis=axis2&lt;BR /&gt;
            href= 2.5 14.5  /* Add vertical line to differenate Blocks */&lt;BR /&gt;
            turnhlabels&lt;BR /&gt;
            chref=black&lt;BR /&gt;
            lhref=1&lt;BR /&gt;
            vreflabpos=3&lt;BR /&gt;
            boxconnect&lt;BR /&gt;
            nolimits&lt;BR /&gt;
            blockpos=3&lt;BR /&gt;
            npanel=&amp;amp;Maxdategrpindex&lt;BR /&gt;
            cclip=red&lt;BR /&gt;
            clipsymbol=dot&lt;BR /&gt;
            clipfactor=4  /* This is 5 times the interQuartile Distance */&lt;BR /&gt;
            Des="All";&lt;BR /&gt;
            ;&lt;BR /&gt;
      format turnaround 4. dategrpindex timeaxis.;&lt;BR /&gt;
   run;</description>
      <pubDate>Tue, 26 Jan 2010 19:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/BOX-Plot-on-a-non-discrete-axis/m-p/46405#M1573</guid>
      <dc:creator>barheat</dc:creator>
      <dc:date>2010-01-26T19:18:20Z</dc:date>
    </item>
  </channel>
</rss>

