<?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 Gridline frequency in sgplot. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Gridline-frequency-in-sgplot/m-p/970632#M377114</link>
    <description>&lt;P&gt;Is there a maximum frequency for gridlines in proc sgplot?&lt;/P&gt;
&lt;P&gt;The following command draws gridlines every 100 units as it should:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;xaxis grid values=(56000 to 57000 by &lt;STRONG&gt;100&lt;/STRONG&gt;);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;However, if I decrease the spacing to 50 such as this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;xaxis grid values=(56000 to 57000 by &lt;STRONG&gt;50&lt;/STRONG&gt;);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;the grid spacing on the graph remains at 100.&lt;/P&gt;
&lt;P&gt;I played around with this and the lowest I could do was 80, but nothing less than that.&lt;/P&gt;
&lt;P&gt;P.S. I tried changing the range and it appears the graph doesn't do more than about 12 gridlines per range.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jul 2025 23:20:06 GMT</pubDate>
    <dc:creator>Vic3</dc:creator>
    <dc:date>2025-07-11T23:20:06Z</dc:date>
    <item>
      <title>Gridline frequency in sgplot.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Gridline-frequency-in-sgplot/m-p/970632#M377114</link>
      <description>&lt;P&gt;Is there a maximum frequency for gridlines in proc sgplot?&lt;/P&gt;
&lt;P&gt;The following command draws gridlines every 100 units as it should:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;xaxis grid values=(56000 to 57000 by &lt;STRONG&gt;100&lt;/STRONG&gt;);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;However, if I decrease the spacing to 50 such as this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EM&gt;xaxis grid values=(56000 to 57000 by &lt;STRONG&gt;50&lt;/STRONG&gt;);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;the grid spacing on the graph remains at 100.&lt;/P&gt;
&lt;P&gt;I played around with this and the lowest I could do was 80, but nothing less than that.&lt;/P&gt;
&lt;P&gt;P.S. I tried changing the range and it appears the graph doesn't do more than about 12 gridlines per range.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 23:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Gridline-frequency-in-sgplot/m-p/970632#M377114</guid>
      <dc:creator>Vic3</dc:creator>
      <dc:date>2025-07-11T23:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Gridline frequency in sgplot.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Gridline-frequency-in-sgplot/m-p/970635#M377115</link>
      <description>&lt;P&gt;Did your LOG show any messages? There are times when you can request more memory for the graph elements than your current settings can actually display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You really should include the entire code of a procedure, and better would be to include the LOG, as the interactions between options of different statements can seriously effect results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A basic request for that many ticks I get:&lt;/P&gt;
&lt;PRE&gt;1    proc sgplot data=sashelp.class;
2      scatter x=weight y=height;
3      xaxis grid values=(1 to 10001 by 50);
4    run;

NOTE: Writing HTML Body file: sashtml.htm
NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           1.38 seconds
      cpu time            0.51 seconds

NOTE: Some of the tick values have been thinned.
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
&lt;/PRE&gt;
&lt;P&gt;The thinning is likely at the TICK level, not the grid, because the number of characters to display for 56000, 56050, etc will collide. So a change to the FITPOLICY option of the xaxis looks like a place to start as the default is FITPOLICY=THIN.&lt;/P&gt;
&lt;P&gt;Changing to FITPOLICY=ROTATE my log shows:&lt;/P&gt;
&lt;PRE&gt;5    proc sgplot data=sashelp.class;
6      scatter x=weight y=height;
7      xaxis grid values=(1 to 10001 by 50) fitpolicy=rotate;
8    run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.37 seconds
      cpu time            0.01 seconds

NOTE: There were 19 observations read from the data set SASHELP.CLASS.

&lt;/PRE&gt;
&lt;P&gt;No thinning, the axis labels are rotated diagonally but illegible because there are still too many values to be read at the default size of my graphics area. I suspect unless you are displaying the axis on something approaching 20 or 25 inches that many values the axis text will be non-legible but you can try other axis text options if you want to see them.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 00:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Gridline-frequency-in-sgplot/m-p/970635#M377115</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-07-12T00:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Gridline frequency in sgplot.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Gridline-frequency-in-sgplot/m-p/970647#M377124</link>
      <description>&lt;P&gt;If you do actually want some labels with that many grid lines then perhaps use the MINOR, to add tick marks between the labeled tick, MINORCOUNT=&amp;lt;some number&amp;gt; (or MINORINTERVAL if using date/time variable) to provide the number of minor tick marks between the labeled ticks, and&amp;nbsp; MINORGRID to add the grid lines at the minor ticks as well as the labeled ticks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jul 2025 14:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Gridline-frequency-in-sgplot/m-p/970647#M377124</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-07-12T14:39:05Z</dc:date>
    </item>
  </channel>
</rss>

