<?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 Needle graph fitpolicy issues in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346180#M12031</link>
    <description>&lt;P&gt;We are on SAS 9.4. We were trying to do a dynamic values for XAxis since this should be repeatable code for any month/week. We need type=discrete to remove 'blank' time reported. Maybe macro variable passed into the Values=() statement would work.I was also looking at the interval = and tick value format application and it looks like the following code gets us close to just the discrete - still would like to rotate the Xaxis interval/ticks. Here was code and attached the resulting chart is attached. If I remove the staggerthin it gets busy again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=plotit;&lt;BR /&gt;needle x=startime y=smfdata ;&lt;BR /&gt;yaxis grid ;&lt;BR /&gt;xaxis type=discrete grid FITPOLICY=staggerthin interval=week tickvalueformat=date;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13652iC5FCE31646C33B3C/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Sample discrete sgplot.gif" title="Sample discrete sgplot.gif" /&gt;</description>
    <pubDate>Fri, 31 Mar 2017 15:28:09 GMT</pubDate>
    <dc:creator>MaryPet123</dc:creator>
    <dc:date>2017-03-31T15:28:09Z</dc:date>
    <item>
      <title>SGPLOT Needle graph fitpolicy issues</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346160#M12026</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm trying to create graph using SGPLOT with datetime variable on X axis that contains in excess of 500 datapoints. I need to show all datapoints so utilized the NEEDLE graph for this. Without any specialized coding the x axis labels becomes unreadable. After reading up on SGPLOT (and we are on SAS 9.4) I found the FITPOLICY settings that allow us to select differing STAGGER options. I used STAGGERTHIN and the datetime variables are limited and readable however they are horizontal and would like to get them in a rotated angle to make it more readable. When I try to use STAGGERROTATE it goes back to showing all of the axis labels&amp;nbsp;(appears stagger is not working). &amp;nbsp;Is there another option or way to rotate the x axis datapoints that I am missing? Or do I need to revert back to GPLOT. Here is code that kind of works. (note discrete used as we removed weekends)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;proc sgplot data=plotit;&lt;BR /&gt;needle x=datetime y=smfdata&amp;nbsp;;&lt;BR /&gt;yaxis grid ;&lt;BR /&gt;xaxis type=discrete grid FITPOLICY=STAGGERTHIN ;&amp;nbsp;&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 14:26:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346160#M12026</guid>
      <dc:creator>MaryPet123</dc:creator>
      <dc:date>2017-03-31T14:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Needle graph fitpolicy issues</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346165#M12027</link>
      <description>&lt;P&gt;By default, the ROTATE fit policy rotates the baseline 45 degrees. You can change that to 90 degrees by also specifying VALUESROTATE=VERTICAL along with your ROTATE fit policy. For the STAGGERROTATE&amp;nbsp;fit policy, the values are first staggered. If there are still collisions, the values are fit using ROTATE (as staggering and rotation cannot be done together).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your X variable is datetime, you might want to consider not using TYPE=DISCRETE and let the TIME axis be used. You can also control the interval displayed by using the INTERVAL option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 14:51:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346165#M12027</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-03-31T14:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Needle graph fitpolicy issues</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346167#M12029</link>
      <description>&lt;P&gt;Which version of SAS are you using? The latest releases have all had noticeable changes to available options and we would like to not make a recommendation that you can't use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might consider adding a VALUES=() part to your Xaxis statement to control which values are displayed.&lt;/P&gt;
&lt;P&gt;Also what format does your x variable currently have? You may want ot consider a Tickvalueformat option on Xaxis to control appearance better (shorted display).&lt;/P&gt;
&lt;P&gt;You don't mention what your interval actually may or the actual&amp;nbsp;total interval of time involved&amp;nbsp;for your 500 points but since you say you "removoed weekendends" you might consider the options to display ticks at on one or two days per week with Values.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 14:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346167#M12029</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-31T14:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Needle graph fitpolicy issues</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346174#M12030</link>
      <description>that explains why rotate then works but stagger stops. We want to use type=discrete to remove all white space between weekends (or shifts if we go to that). Will look at interval option. Thanks</description>
      <pubDate>Fri, 31 Mar 2017 15:10:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346174#M12030</guid>
      <dc:creator>MaryPet123</dc:creator>
      <dc:date>2017-03-31T15:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT Needle graph fitpolicy issues</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346180#M12031</link>
      <description>&lt;P&gt;We are on SAS 9.4. We were trying to do a dynamic values for XAxis since this should be repeatable code for any month/week. We need type=discrete to remove 'blank' time reported. Maybe macro variable passed into the Values=() statement would work.I was also looking at the interval = and tick value format application and it looks like the following code gets us close to just the discrete - still would like to rotate the Xaxis interval/ticks. Here was code and attached the resulting chart is attached. If I remove the staggerthin it gets busy again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=plotit;&lt;BR /&gt;needle x=startime y=smfdata ;&lt;BR /&gt;yaxis grid ;&lt;BR /&gt;xaxis type=discrete grid FITPOLICY=staggerthin interval=week tickvalueformat=date;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13652iC5FCE31646C33B3C/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Sample discrete sgplot.gif" title="Sample discrete sgplot.gif" /&gt;</description>
      <pubDate>Fri, 31 Mar 2017 15:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-Needle-graph-fitpolicy-issues/m-p/346180#M12031</guid>
      <dc:creator>MaryPet123</dc:creator>
      <dc:date>2017-03-31T15:28:09Z</dc:date>
    </item>
  </channel>
</rss>

