<?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: Highest and lowest axis ticks not meeting axis line in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677570#M20381</link>
    <description>&lt;P&gt;The output destination is PDF. See my full code below. I've also attached my data.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define style Custom;
parent = Styles.default; 
class graphaxislines/color=black width=0.75pt;
class graphbackground/color=white;
end;
run;

PROC IMPORT OUT= WORK.prim_sub_use DATAFILE= "E:\SAS figures\Primary substance use data"
            DBMS=xlsx REPLACE;
     		GETNAMES=YES;
RUN;

data prim_sub_use;
set prim_sub_use; 
label 
Alcohol	='^_^_Alcohol^_'
Opiates	='^_^_Opiates^_'
Cocaine	='^_^_Cocaine^_'
Marijuana='^_^_Marijuana/hashish^_'
Methamphetamine_amphetamines='^_Methamphetamine/amphetamines^_'
;
run;

ods _all_ close;
options nonumber nodate orientation=landscape papersize=letter nocenter
leftmargin=.5in rightmargin=.5in topmargin=.5in bottommargin=.5in;
ods pdf file="E:/SAS figures/fig1_pdf_new.pdf" dpi=300 notoc;
ods pdf style=Custom;
ods layout start style={bordercolor=white borderstyle=solid borderwidth=1pt backgroundcolor=white} description='Primary substance use at admission, 2007-2017';
ods noptitle;
ods region x=0in y=0in width=6.5in style=[borderwidth=1 bordercolor=white backgroundcolor=white];
ods graphics on/ reset=all border=off noborder width=6.5in scale=on;
title;

proc sgplot data=prim_sub_use noborder nowall;
series x=Year y=Alcohol/markers markerattrs=(symbol=CircleFilled color='#0060A9' size=12) lineattrs=(color='#0060A9' thickness=1.5pt);
series x=Year y=Opiates/markers markerattrs=(symbol=TriangleDownFilled size=12 color='#ed1c24') lineattrs=(color='#ed1c24' thickness=1.5pt pattern=solid);
series x=Year y=Cocaine/markers markerattrs=(symbol=SquareFilled color='#ffc222' size=12) lineattrs=(color='#ffc222' thickness=1.5pt pattern=solid);
series x=Year y=Marijuana/markers markerattrs=(symbol=DiamondFilled color='#64c069' size=12) lineattrs=(color='#64c069' thickness=1.5pt pattern=solid) legendlabel="Marijuana/hashish";
series x=Year y=Methamphetamine_amphetamines/markers markerattrs=(symbol=TriangleFilled size=12 color='#00a2e5') lineattrs=(color='#00a2e5' thickness=1.5pt pattern=solid);
yaxis label='Percent of all admissions aged 12 years and older' VALUES = (0 TO 50 BY 10) tickvalueformat=data labelattrs=(family=Arial size=8) offsetmax=0 offsetmin=0 
thresholdmin=1 thresholdmax=1 valueattrs=(family=Arial size=8);
xaxis label='Admission Year' VALUES = (2007 TO 2017 BY 1) display=(nolabel noticks) valueattrs=(family=Arial size=8);
keylegend/noborder linelength=30 fillaspect=golden valueattrs=(family=Arial size=8);
run;

ods graphics off;
ods layout end;
ods pdf close;
ods _ALL_ CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 18 Aug 2020 17:44:56 GMT</pubDate>
    <dc:creator>martyvd</dc:creator>
    <dc:date>2020-08-18T17:44:56Z</dc:date>
    <item>
      <title>Highest and lowest axis ticks not meeting axis line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677538#M20379</link>
      <description>&lt;P&gt;The highest and lowest y-axis ticks on my graph are not meeting the axis line properly. See my yaxis code and pictures below. I am using SGPLOT.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;yaxis label='Percent of all admissions aged 12 years and older' VALUES = (0 TO 50 BY 10) tickvalueformat=data labelattrs=(family=Arial size=8) offsetmax=0 offsetmin=0 
thresholdmin=1 thresholdmax=1 valueattrs=(family=Arial size=8);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yaxistick.JPG" style="width: 734px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48385iA2C055EF820DADDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="yaxistick.JPG" alt="yaxistick.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xaxistick.JPG" style="width: 460px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48386i5E554BE43BBEE4C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="xaxistick.JPG" alt="xaxistick.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 16:07:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677538#M20379</guid>
      <dc:creator>martyvd</dc:creator>
      <dc:date>2020-08-18T16:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Highest and lowest axis ticks not meeting axis line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677544#M20380</link>
      <description>&lt;P&gt;It is a good idea to share some data that will recreate the issue and show the entire procedure code.&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;Provide all ODS graphics options that are also in effect when the program is run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this is an appearance issue which ODS destination are you sending the output to?&lt;/P&gt;
&lt;P&gt;In some cases some resolution of monitor/graphic file type and DPI settings can cause things not to appear to align at some viewing resolutions.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 16:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677544#M20380</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-18T16:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Highest and lowest axis ticks not meeting axis line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677570#M20381</link>
      <description>&lt;P&gt;The output destination is PDF. See my full code below. I've also attached my data.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define style Custom;
parent = Styles.default; 
class graphaxislines/color=black width=0.75pt;
class graphbackground/color=white;
end;
run;

PROC IMPORT OUT= WORK.prim_sub_use DATAFILE= "E:\SAS figures\Primary substance use data"
            DBMS=xlsx REPLACE;
     		GETNAMES=YES;
RUN;

data prim_sub_use;
set prim_sub_use; 
label 
Alcohol	='^_^_Alcohol^_'
Opiates	='^_^_Opiates^_'
Cocaine	='^_^_Cocaine^_'
Marijuana='^_^_Marijuana/hashish^_'
Methamphetamine_amphetamines='^_Methamphetamine/amphetamines^_'
;
run;

ods _all_ close;
options nonumber nodate orientation=landscape papersize=letter nocenter
leftmargin=.5in rightmargin=.5in topmargin=.5in bottommargin=.5in;
ods pdf file="E:/SAS figures/fig1_pdf_new.pdf" dpi=300 notoc;
ods pdf style=Custom;
ods layout start style={bordercolor=white borderstyle=solid borderwidth=1pt backgroundcolor=white} description='Primary substance use at admission, 2007-2017';
ods noptitle;
ods region x=0in y=0in width=6.5in style=[borderwidth=1 bordercolor=white backgroundcolor=white];
ods graphics on/ reset=all border=off noborder width=6.5in scale=on;
title;

proc sgplot data=prim_sub_use noborder nowall;
series x=Year y=Alcohol/markers markerattrs=(symbol=CircleFilled color='#0060A9' size=12) lineattrs=(color='#0060A9' thickness=1.5pt);
series x=Year y=Opiates/markers markerattrs=(symbol=TriangleDownFilled size=12 color='#ed1c24') lineattrs=(color='#ed1c24' thickness=1.5pt pattern=solid);
series x=Year y=Cocaine/markers markerattrs=(symbol=SquareFilled color='#ffc222' size=12) lineattrs=(color='#ffc222' thickness=1.5pt pattern=solid);
series x=Year y=Marijuana/markers markerattrs=(symbol=DiamondFilled color='#64c069' size=12) lineattrs=(color='#64c069' thickness=1.5pt pattern=solid) legendlabel="Marijuana/hashish";
series x=Year y=Methamphetamine_amphetamines/markers markerattrs=(symbol=TriangleFilled size=12 color='#00a2e5') lineattrs=(color='#00a2e5' thickness=1.5pt pattern=solid);
yaxis label='Percent of all admissions aged 12 years and older' VALUES = (0 TO 50 BY 10) tickvalueformat=data labelattrs=(family=Arial size=8) offsetmax=0 offsetmin=0 
thresholdmin=1 thresholdmax=1 valueattrs=(family=Arial size=8);
xaxis label='Admission Year' VALUES = (2007 TO 2017 BY 1) display=(nolabel noticks) valueattrs=(family=Arial size=8);
keylegend/noborder linelength=30 fillaspect=golden valueattrs=(family=Arial size=8);
run;

ods graphics off;
ods layout end;
ods pdf close;
ods _ALL_ CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Aug 2020 17:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677570#M20381</guid>
      <dc:creator>martyvd</dc:creator>
      <dc:date>2020-08-18T17:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Highest and lowest axis ticks not meeting axis line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677611#M20382</link>
      <description>&lt;P&gt;It could be that antialiassing has been turned off. This happens when there are more than 4000 elements to draw in a plot. You can ask for a higher limit in the ODS GRAPHICS statement with option&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;ANTIALIASMAX= &lt;EM class="xisDoc-userSuppliedValue"&gt;100000&lt;/EM&gt;&lt;/H4&gt;</description>
      <pubDate>Tue, 18 Aug 2020 19:41:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677611#M20382</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-08-18T19:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Highest and lowest axis ticks not meeting axis line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677800#M20383</link>
      <description>Adding this option does not seem to make any difference.</description>
      <pubDate>Wed, 19 Aug 2020 14:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/677800#M20383</guid>
      <dc:creator>martyvd</dc:creator>
      <dc:date>2020-08-19T14:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Highest and lowest axis ticks not meeting axis line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/678625#M20404</link>
      <description>&lt;P&gt;Either suppress the tickmarks or use the accepted solution (inside ticks), both shown here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/SGPLOT-how-to-get-tick-marks-inside/td-p/343401" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Graphics-Programming/SGPLOT-how-to-get-tick-marks-inside/td-p/343401&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do keep the status quo, I don't believe anybody will even notice the tick lines not matching at the joint&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Aug 2020 02:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highest-and-lowest-axis-ticks-not-meeting-axis-line/m-p/678625#M20404</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2020-08-22T02:43:03Z</dc:date>
    </item>
  </channel>
</rss>

