[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: How to use transparancy to show the text over the line on SAS graph
From:       "High, Robin R" <rhigh () UNMC ! EDU>
Date:       2019-03-28 20:06:45
Message-ID: SN6PR05MB40152E23A3AA24D213ED2B60C9590 () SN6PR05MB4015 ! namprd05 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]


Place the TEXT statement after the REFLINE statement; perhaps can add transparency=.3 \
(or some larger value) to the refline statement as well.

Robin High
UNMC CoPH


From: SAS(r) Discussion <SAS-L@LISTSERV.UGA.EDU> On Behalf Of sas MJ
Sent: Wednesday, March 27, 2019 8:50 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: How to use transparancy to show the text over the line on SAS graph

Non-UNMC email



Hi SAS-Ls,

I need label text on the thick line plot, but I need show the text front the line, \
not behind the line. How to code transparency on the sgplot?

Original code:
data have;
set have;
cat1=1;
proc sgplot data=have noautolegend;
  scatter x=cat y=var / markerattrs=(symbol=circle size=10 color=blue);
  text x=cat y=var text=name /position = top textattrs=(size=12pt) ;
  yaxis values=(0 to 3 by 0.5) labelattrs=(size=12pt);
  xaxis values=(0 to 4 by 1) valueattrs=(size=12pt) labelattrs=(size=12pt);
  format cat cat.;
refline cat1 / axis = x lineattrs=(color=green pattern=solid thickness=10);

How can I let text overlap the line?


Thanks,
MJ



The information in this e-mail may be privileged and confidential, intended only for \
the use of the addressee(s) above. Any unauthorized use or disclosure of this \
information is prohibited. If you have received this e-mail by mistake, please delete \
it and immediately contact the sender.


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Helvetica;
	panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Place \
the TEXT statement after the REFLINE statement; perhaps can add transparency=.3 (or \
some larger value) to the refline statement as well.<o:p></o:p></span></p> <p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Robin \
High<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">UNMC \
CoPH<o:p></o:p></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
 <p class="MsoNormal"><b><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> SAS(r) \
Discussion &lt;SAS-L@LISTSERV.UGA.EDU&gt; <b>On Behalf Of </b>sas MJ<br>
<b>Sent:</b> Wednesday, March 27, 2019 8:50 AM<br>
<b>To:</b> SAS-L@LISTSERV.UGA.EDU<br>
<b>Subject:</b> How to use transparancy to show the text over the line on SAS \
graph<o:p></o:p></span></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span \
style="font-size:9.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#F82F04">Non-UNMC \
email<br> <br>
<br>
</span><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#F82F04">&nbsp;</span><o:p></o:p></p>
 <div>
<div>
<p class="MsoNormal">Hi SAS-Ls,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I need label text on the thick line plot, but I need show the \
text front the line, not behind the line. How to code transparency on the sgplot? \
&nbsp;<o:p></o:p></p> </div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Original code:&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">data have;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">set have;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">cat1=1;<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">proc sgplot data=have noautolegend;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp; scatter x=cat y=var / markerattrs=(symbol=circle size=10 \
color=blue);<o:p></o:p></p> </div>
<div>
<p class="MsoNormal">&nbsp; text x=cat y=var text=name /position = top \
textattrs=(size=12pt) ;<o:p></o:p></p> </div>
<div>
<p class="MsoNormal">&nbsp; yaxis values=(0 to 3 by 0.5) \
labelattrs=(size=12pt);<o:p></o:p></p> </div>
<div>
<p class="MsoNormal">&nbsp; xaxis values=(0 to 4 by 1) valueattrs=(size=12pt) \
labelattrs=(size=12pt);<o:p></o:p></p> </div>
<div>
<p class="MsoNormal">&nbsp; format cat cat.;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">refline cat1 / axis = x lineattrs=(color=green pattern=solid \
thickness=10);<o:p></o:p></p> </div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">How can I let text overlap the line?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">MJ<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</div>
</div>
<br>
The information in this e-mail may be privileged and confidential, intended only for \
the use of the addressee(s) above. Any unauthorized use or disclosure of this \
information is prohibited. If you have received this e-mail by mistake, please delete \
it and immediately  contact the sender.
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic