<?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: Refline in SQ plot, turn labels horizonal in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202612#M7521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A picture or runnable program would help to see wht is going on.&amp;nbsp; The default location for labels is outside.&amp;nbsp; So, if the reference line labels get too close and collide, they all will be rotated.&amp;nbsp; You can provide more width, or move them inside. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2015 17:40:04 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2015-08-19T17:40:04Z</dc:date>
    <item>
      <title>Refline in SQ plot, turn labels horizonal</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202611#M7520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have code that resembles this:&lt;/P&gt;&lt;P&gt;proc sgplot data=d1;&lt;/P&gt;&lt;P&gt;histogram myvariable/scale=count BINWIDTH=5;&lt;/P&gt;&lt;P&gt;refline 0.3 0.7 1.77 2.78 10/axis=X label=("100%" "82%" "82%" "76%" "37%") LINEATTRS=(color=red);*add the 5 reference lines and labels;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run it, it produces the histogram I want, with the reference lines I want.&amp;nbsp; However, the labels for the reference lines are turned vertically, not horizontal in normal reading fashion.&amp;nbsp; I could not find any option to turn those labels horizontal.&amp;nbsp; Is there a way in SAS to do it? Thank you, Nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 16:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202611#M7520</guid>
      <dc:creator>NWV</dc:creator>
      <dc:date>2015-08-19T16:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Refline in SQ plot, turn labels horizonal</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202612#M7521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A picture or runnable program would help to see wht is going on.&amp;nbsp; The default location for labels is outside.&amp;nbsp; So, if the reference line labels get too close and collide, they all will be rotated.&amp;nbsp; You can provide more width, or move them inside. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 17:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202612#M7521</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-08-19T17:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Refline in SQ plot, turn labels horizonal</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202613#M7522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would love to attache a picture.&amp;nbsp; I have a screen shot, saved as a jpg, but when I try and "insert image" to this reply box, it does not work.&amp;nbsp; I've tried both IE and chrome.&amp;nbsp; I will try some of your other suggestions, and see if I can get a better result.&amp;nbsp; The data is not in the public domain, so a runnable program with the same set up would be rather time consuming.&amp;nbsp; Thank you very much for the response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 20:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202613#M7522</guid>
      <dc:creator>NWV</dc:creator>
      <dc:date>2015-08-19T20:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Refline in SQ plot, turn labels horizonal</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202614#M7523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the "Insert Image" feature is turned off as it is often used to spam the site.&amp;nbsp; It is a problem for us all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes the issue can be reproduced using one of the SASHELP data sets like Cars or Heart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=sashelp.heart;&lt;/P&gt;&lt;P&gt;&amp;nbsp; histogram cholesterol;&lt;/P&gt;&lt;P&gt;&amp;nbsp; refline 200 210 220 / axis=x label=("200" "210" "220") labelattrs=(size=12);&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis max=400;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=sashelp.heart;&lt;/P&gt;&lt;P&gt;&amp;nbsp; histogram cholesterol;&lt;/P&gt;&lt;P&gt;&amp;nbsp; refline 200 210 220 / axis=x label=("200" "210" "220") labelloc=inside labelattrs=(size=12);&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis max=400;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With LABELLOC=INSIDE, colliding labels will be drawn,but the results may be less then ideal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 15:13:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202614#M7523</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-08-20T15:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Refline in SQ plot, turn labels horizonal</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202615#M7524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you suggest, with the LABELLOC=INSIDE, colliding labels are drawn, but they overlap.&amp;nbsp; I did try the labelattrs=(size=12), but that option does not appear to work in my refline statement.&amp;nbsp; Not sure if that is just me, or a base SAS thing.&amp;nbsp; I am running SAS 9.3 TS Level 1m2 W32_7 Pro platform.&amp;nbsp; I will revisit the data a decide if some of the reference lines can be dropped.&amp;nbsp; But thank you very much for the bit about label location, because I never would have guessed that would turn the labels horizontal, into normal reading angle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 15:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202615#M7524</guid>
      <dc:creator>NWV</dc:creator>
      <dc:date>2015-08-20T15:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Refline in SQ plot, turn labels horizonal</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202616#M7525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Technically, LABELLOC does not "turn" the labels to horizontal.&amp;nbsp; It just draws the label in the normal way, and if they collide, too bad.&amp;nbsp; The default LABELLOC=OUTSIDE does extra work for you to avoid collision between labels and any potential axis labels too.&amp;nbsp; If such collision is detected, all labels are turned sideways, or at an angle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don;t really need the LABELATTRS=(SIZE=12).&amp;nbsp; I did that to trigger the collisions.&amp;nbsp; This option may have been added at SAS 9.40 or later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If these labels are a must, one possibility is to stagger alternate labels top and bottom using LABELPOS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=sashelp.heart;&lt;/P&gt;&lt;P&gt;&amp;nbsp; histogram cholesterol;&lt;/P&gt;&lt;P&gt;&amp;nbsp; refline 200 220 / axis=x label=("200" "220") labelloc=inside labelattrs=(size=12);&lt;/P&gt;&lt;P&gt;&amp;nbsp; refline 210 230 / axis=x label=("210" "230") labelloc=inside labelpos=min labelattrs=(size=12);&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis max=400;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 16:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202616#M7525</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-08-20T16:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Refline in SQ plot, turn labels horizonal</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202617#M7526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is an excellent suggestion, I will try it out.&amp;nbsp; The author wants the labels on there, no way to get around it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 16:31:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Refline-in-SQ-plot-turn-labels-horizonal/m-p/202617#M7526</guid>
      <dc:creator>NWV</dc:creator>
      <dc:date>2015-08-20T16:31:02Z</dc:date>
    </item>
  </channel>
</rss>

