<?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 Sgplot highlow chart axis not showing all values in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805512#M22707</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to plot highlow chart using sgplot with the code below. How to make SAS show all years on the x-axis? Currently it shows only even numbers. I've tried different xaxis options but without success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input year min max;
	datalines;
	2015 10 20
	2016 15 25
	2017 20 30
	2018 25 50
	2019 40 45
	2020 20 50
	2021 10 80
	;
run;

proc sgplot data=have noborder;
  highlow x=year low=min high=max / type=bar;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 01 Apr 2022 14:37:29 GMT</pubDate>
    <dc:creator>chris2377</dc:creator>
    <dc:date>2022-04-01T14:37:29Z</dc:date>
    <item>
      <title>Sgplot highlow chart axis not showing all values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805512#M22707</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm trying to plot highlow chart using sgplot with the code below. How to make SAS show all years on the x-axis? Currently it shows only even numbers. I've tried different xaxis options but without success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input year min max;
	datalines;
	2015 10 20
	2016 15 25
	2017 20 30
	2018 25 50
	2019 40 45
	2020 20 50
	2021 10 80
	;
run;

proc sgplot data=have noborder;
  highlow x=year low=min high=max / type=bar;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Apr 2022 14:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805512#M22707</guid>
      <dc:creator>chris2377</dc:creator>
      <dc:date>2022-04-01T14:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot highlow chart axis not showing all values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805521#M22708</link>
      <description>&lt;PRE&gt;proc sgplot data=have noborder;
  highlow x=year low=min high=max / type=bar;
  xaxis values=(2015 to 2021 by 1);
run;&lt;/PRE&gt;
&lt;P&gt;Or an explicit list of values&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 15:06:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805521#M22708</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-01T15:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot highlow chart axis not showing all values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805526#M22709</link>
      <description>&lt;P&gt;Many thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;In the meantime, I've discovered that converting years to characters also works. Just in case someone needed&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 15:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805526#M22709</guid>
      <dc:creator>chris2377</dc:creator>
      <dc:date>2022-04-01T15:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot highlow chart axis not showing all values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805529#M22710</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24842"&gt;@chris2377&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Many thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;In the meantime, I've discovered that converting years to characters also works. Just in case someone needed&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I find the flexibility of the Values = (x to y by z) to be much more flexible than character. Also if your graph size and number of X axis values is "large" then you can have much more control easily than with character values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You want to use extreme caution with character values for date related issues, especially for those still unenlightened enough to use 2-digit years for any purpose. Display order can be other than expected (99 is way after 01 with 2 digits). Four digit years are generally not a problem but as soon as you move this to DATES you can have issues with too many values and hard to read graphs and/or sort order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if character values are used then some plots like Reg don't really work as that requires an actual calculated interval.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 15:28:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805529#M22710</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-01T15:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot highlow chart axis not showing all values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805618#M22715</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input year min max;
	datalines;
	2015 10 20
	2016 15 25
	2017 20 30
	2018 25 50
	2019 40 45
	2020 20 50
	2021 10 80
	;
run;

proc sgplot data=have noborder;
  highlow x=year low=min high=max / type=bar;
  xaxis type=discrete;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Apr 2022 12:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-highlow-chart-axis-not-showing-all-values/m-p/805618#M22715</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-04-02T12:23:14Z</dc:date>
    </item>
  </channel>
</rss>

