<?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: PROC SGPLOT: How to move yaxis label above the plot area box in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624327#M20086</link>
    <description>&lt;P&gt;I bet! I feel like there should be an easier way that we are missing. But glad you are getting it working!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Peter&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2020 20:08:23 GMT</pubDate>
    <dc:creator>Panagiotis</dc:creator>
    <dc:date>2020-02-12T20:08:23Z</dc:date>
    <item>
      <title>PROC SGPLOT: How to move yaxis label above the plot area box</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624290#M20079</link>
      <description>&lt;P&gt;This seems like it should be an easy question, but I have been unable to find an option for this in SGPLOT (version 9.4 M5). I have a horizontal bar chart with very long category value labels (can't really shorten these, unfortunately). I have the Y Axis label set to appear on the top, but it appears above the value labels instead of the bars. I would like the label to be moved over to the right so it lines up with the box around the data. Here's my code (chart output is below):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=lq_base NOAUTOLEGEND;
styleattrs DATACOLORS=(cxEAAA00 cx002855);
hbar ClusterName / response=employ_growth_us 
	group=employ_g_us 
	nooutline
	barwidth=0.8;
xaxis DISPLAY=(NOLABEL)
	VALUEATTRS=(Family=Calibri Size=8);
yaxis label="Location Quotient" 
	LABELATTRS=(Family=Calibri Size=8 Weight=Bold)
	LABELPOS=TOP
	discreteorder=data
	type=discrete fitpolicy=none
	VALUEATTRS=(Family=Calibri Size=8);
where ClusterCode&amp;lt;=51;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LQ_Chart1.png" style="width: 360px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36075iC9533120D394D8BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="LQ_Chart1.png" alt="LQ_Chart1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:49:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624290#M20079</guid>
      <dc:creator>ebowen</dc:creator>
      <dc:date>2020-02-12T18:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: How to move yaxis label above the plot area box</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624310#M20083</link>
      <description>&lt;P&gt;I though there would be an easy way, but I couldn't find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I did find was another thread with something similar. I'm not terribly sure how the solution of that thread works, but one of the other posts worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the thread:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/td-p/229762" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/td-p/229762&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used Bryan's solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also switched from your table to SASHELP.CARS so I could test the solution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like you can use another table as a way to annotate your visual using the sganno option in the proc sgplot statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this? You'd have to dive a bit more into the columns to create to set similar formatting to what you have:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data anno;
	function="text";
	x1space= 'graphpercent';
	y1space= 'graphpercent';
	width=400;
	textweight='bold';
	textsize=10;
	y1=95;
	x1=50;
	label="Location Quotient";
	output;
run;


proc sgplot data=sashelp.cars NOAUTOLEGEND sganno=anno ;
title 'test';
styleattrs DATACOLORS=(cxEAAA00 cx002855);
hbar Make / response=MSRP 
	group=Origin 
	nooutline
	barwidth=0.8;
xaxis DISPLAY=(NOLABEL)
	VALUEATTRS=(Family=Calibri Size=8);
yaxis label="Location Quotient" 
	LABELATTRS=(Family=Calibri Size=8 Weight=Bold)
	LABELPOS=TOP
	discreteorder=data
	type=discrete fitpolicy=none
	VALUEATTRS=(Family=Calibri Size=8);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PGSGPLOT.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36077iAD0C2ED6AC77F351/image-size/large?v=v2&amp;amp;px=999" role="button" title="PGSGPLOT.jpg" alt="PGSGPLOT.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Peter&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 19:30:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624310#M20083</guid>
      <dc:creator>Panagiotis</dc:creator>
      <dc:date>2020-02-12T19:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: How to move yaxis label above the plot area box</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624326#M20085</link>
      <description>Thank you for your reply. Your solution of using the annotation certainly works, though it's kind of painful getting it to appear in the right spot!</description>
      <pubDate>Wed, 12 Feb 2020 20:00:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624326#M20085</guid>
      <dc:creator>ebowen</dc:creator>
      <dc:date>2020-02-12T20:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: How to move yaxis label above the plot area box</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624327#M20086</link>
      <description>&lt;P&gt;I bet! I feel like there should be an easier way that we are missing. But glad you are getting it working!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Peter&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 20:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-SGPLOT-How-to-move-yaxis-label-above-the-plot-area-box/m-p/624327#M20086</guid>
      <dc:creator>Panagiotis</dc:creator>
      <dc:date>2020-02-12T20:08:23Z</dc:date>
    </item>
  </channel>
</rss>

