<?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: HELP NEEDED WITH SGPLOT &amp; SGPANEL in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/HELP-NEEDED-WITH-SGPLOT-SGPANEL/m-p/143385#M5432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some thoughts:&lt;/P&gt;&lt;P&gt;1. Axis -- Do not set the axis type to DISCRETE and remove the VALUES option. The normal TIME axis will give a better representation given the density of your data. Also, by using the TIME axis, the INTERVAL option will work for you.&lt;/P&gt;&lt;P&gt;2 TItle -- The title is outside of the box because you are using the NOGTITLE option on the ODS HTML statement&lt;/P&gt;&lt;P&gt;3. SGPANEL -- Because you are using a secondary axis, you will not be able to use SGPANEL. However, you have two options:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a. Use SGPLOT with a BY statement, and use ODS LAYOUT to position the graphs side-by-side&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b. Use a DATAPANEL or DATALATTICE layout in GTL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;4. Are you using ODS PDF to generate the output, or are you putting the output into a PDF document yourself?&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2015 04:01:13 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2015-01-29T04:01:13Z</dc:date>
    <item>
      <title>HELP NEEDED WITH SGPLOT &amp; SGPANEL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/HELP-NEEDED-WITH-SGPLOT-SGPANEL/m-p/143383#M5430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am plotting some descriptive statistics of a variable over time to visualize the variable coverage.&lt;/P&gt;&lt;P&gt;X axis is the month.It spans from 2004-01-01 to 2014-05-01 on a monthly basis.&lt;/P&gt;&lt;P&gt;I am using SGPLOT on sas 9.3 and here is the code I am using. (The data is also attached below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=percentiles;&lt;/P&gt;&lt;P&gt;where portfolio='AAA';&lt;/P&gt;&lt;P&gt;series x=date y=score_p5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / lineattrs=(color=CXAAA03E&amp;nbsp;&amp;nbsp;&amp;nbsp; thickness=2 pattern=solid) curvelabel='P05'&amp;nbsp; curvelabelloc=inside curvelabelpos=max;&lt;/P&gt;&lt;P&gt;series x=date y=score_p25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / lineattrs=(color=CXff750&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thickness=2 pattern=solid) curvelabel='P25'&amp;nbsp; curvelabelloc=inside curvelabelpos=max;&lt;/P&gt;&lt;P&gt;series x=date y=score_mean&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / lineattrs=(color=CX84351D&amp;nbsp;&amp;nbsp; thickness=2 pattern=solid) curvelabel='MEAN' curvelabelloc=inside curvelabelpos=max;&lt;/P&gt;&lt;P&gt;series x=date y=score_p50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / lineattrs=(color=CXD1836D&amp;nbsp;&amp;nbsp;&amp;nbsp; thickness=2 pattern=solid) curvelabel='P50'&amp;nbsp; curvelabelloc=inside curvelabelpos=max;&lt;/P&gt;&lt;P&gt;series x=date y=score_p75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / lineattrs=(color=CX5A1804&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thickness=2 pattern=solid) curvelabel='P75'&amp;nbsp; curvelabelloc=inside curvelabelpos=max;&lt;/P&gt;&lt;P&gt;series x=date y=score_p95&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / lineattrs=(color=black&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thickness=2 pattern=solid) curvelabel='P95'&amp;nbsp; curvelabelloc=inside curvelabelpos=max;&lt;/P&gt;&lt;P&gt;needle x=date y=score_miss_pct / y2axis lineattrs=(thickness=3 color=CX4D946E ) transparency=.70;&lt;/P&gt;&lt;P&gt;xaxis label="Month"&amp;nbsp; grid values=("01Jan2004"d to "01Dec2015"d by 1) interval=month type=discrete fitpolicy=rotatethin;&lt;/P&gt;&lt;P&gt;yaxis&amp;nbsp; label="SCORE";&lt;/P&gt;&lt;P&gt;y2axis grid label="Percent Missing";&lt;/P&gt;&lt;P&gt;title "VAR = Score; PORTFOLIO=AAA";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help with the following:&lt;/P&gt;&lt;P&gt;1. The date on the x axis is at an angle. I want to rotate that vertically. In SAS GRAPH there was a rotate option. I need to find a way to do that in SGPLOT.&lt;/P&gt;&lt;P&gt;2. I want the title inside of the box.&lt;/P&gt;&lt;P&gt;3. In the data (attached below), there are two portfolio - AAA and BBB. This plot is only for AAA. I want to show the same plot but in a panel for both the portfolios. This will help me see it across different portfolio. I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; SGPANEL but with not much success. I am hoping someone could help. I have not used GTL but would be open to that if there is a way to display this in a panel.&lt;/P&gt;&lt;P&gt;4.Eventually i want this to output on a PDF. In the PDF however, the image seems a little distorted. I have tried DPI but still it is not as good. Please share tips that has worked for you.&lt;/P&gt;&lt;P&gt;I would appreciate any help/suggestions, codes would be even better &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 23:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/HELP-NEEDED-WITH-SGPLOT-SGPANEL/m-p/143383#M5430</guid>
      <dc:creator>P_S_</dc:creator>
      <dc:date>2015-01-28T23:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: HELP NEEDED WITH SGPLOT &amp; SGPANEL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/HELP-NEEDED-WITH-SGPLOT-SGPANEL/m-p/143384#M5431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which version of SAS are you running? The SG graphics options have changed significantly with each release since 9.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Axis suggestions&lt;/P&gt;&lt;P&gt;Since the dates you are showing all end in -01 I would change the format used to lose that part of the display as it isn't adding anything, possibly yymmd. (the single d means dash between elements)&lt;/P&gt;&lt;P&gt;format date yymmd. ; anywhere in the proc statement or make it the default format when reading the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the values used for the tick marks, maybe to a by year interval such as values=("01Jan2004"d to "01Jan2014"d by year). I'm not sure that your actually adding much by having the additional tick marks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Not finding an easy solution but if you are using 9.3 or later you could an annotation dataset and add the SGANNO= option on the proc statement to use that dataset to write text where you want it instead of a title statement.&lt;/P&gt;&lt;P&gt;3) With the number of items you are displaying I suspect anything that crams two similar plots into a single one might get cramped. I would use a BY statement to create two graphs and see if that works well enough. If the graph size is fixed you might get both onto a single PDF page close enough to almost resemble a panel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) sometimes turning off HTML output, ODS HTML Close, before generating PDF may make the output more PDF friendly.&lt;/P&gt;&lt;P&gt;Also using ODS GRAPHICS height and width options to control the graph size explicitly may help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 00:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/HELP-NEEDED-WITH-SGPLOT-SGPANEL/m-p/143384#M5431</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-01-29T00:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: HELP NEEDED WITH SGPLOT &amp; SGPANEL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/HELP-NEEDED-WITH-SGPLOT-SGPANEL/m-p/143385#M5432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some thoughts:&lt;/P&gt;&lt;P&gt;1. Axis -- Do not set the axis type to DISCRETE and remove the VALUES option. The normal TIME axis will give a better representation given the density of your data. Also, by using the TIME axis, the INTERVAL option will work for you.&lt;/P&gt;&lt;P&gt;2 TItle -- The title is outside of the box because you are using the NOGTITLE option on the ODS HTML statement&lt;/P&gt;&lt;P&gt;3. SGPANEL -- Because you are using a secondary axis, you will not be able to use SGPANEL. However, you have two options:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a. Use SGPLOT with a BY statement, and use ODS LAYOUT to position the graphs side-by-side&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b. Use a DATAPANEL or DATALATTICE layout in GTL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;4. Are you using ODS PDF to generate the output, or are you putting the output into a PDF document yourself?&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 04:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/HELP-NEEDED-WITH-SGPLOT-SGPANEL/m-p/143385#M5432</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2015-01-29T04:01:13Z</dc:date>
    </item>
  </channel>
</rss>

