<?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: Creating a dotted curve and changing the color of the under curve area in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535715#M17801</link>
    <description>&lt;P&gt;Here's a simple example using the new style. You can adapt it to your original code by just adding the LINEATTRS options to your DENSITY statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://drummer.unx.sas.com:41283/results/sastmp/SAS_work23920000348F_drummer/SGPlot1.png" border="0" alt="The SGPlot Procedure" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define style styles.MyJournal;
parent=styles.journal;

style GraphData1 from GraphData1 /
      color = cx000000;
style GraphData2 from GraphData2 /
      color = cx000000;
style GraphOutlines from GraphOutlines /
      contrastcolor = cxFFFFFF;
end;
run;

ods html style=myjournal;
proc sgplot data=sashelp.heart;
histogram weight / transparency=0.4;
histogram cholesterol / transparency=0.4;
density weight / type=kernel lineattrs=(pattern=solid);
density cholesterol / type=kernel lineattrs=(pattern=dot);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 14 Feb 2019 19:24:16 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2019-02-14T19:24:16Z</dc:date>
    <item>
      <title>Creating a dotted curve and changing the color of the under curve area</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535674#M17795</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to submit a paper to a journal which prints graphs in black. The following code gives two nonblack colors to the overlapped curve lines of the two graphs. I would like to know how&amp;nbsp;to&amp;nbsp;adjust this code so I can change (1) one of the curve&amp;nbsp;lines to a dotted curve, (2) change the color of the two histograms to black, one solid and one gradient, and (3) create a white line divides each binwidth,&amp;nbsp;please.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;title "Distributions of scaled earnings and earnings before abnormal CFO";&lt;BR /&gt;proc sgplot data=compu_graph_EBACFO;&lt;BR /&gt;histogram Lagearnings1 / binwidth=0.01 binstart= -0.25 showbins transparency=0.4&lt;BR /&gt;name="Scaled earnings" legendlabel="Scaled earnings";&lt;BR /&gt;histogram EB_ACFO / binwidth=0.01 binstart= -0.25 showbins transparency=0.5&lt;BR /&gt;name="Earnings before abnormal CFO" legendlabel="Earnings before abnormal CFO";&lt;BR /&gt;density Lagearnings1 / type=kernel lineattrs=GraphData1; /* optional */&lt;BR /&gt;density EB_ACFO / type=kernel lineattrs=GraphData2; /* optional */&lt;BR /&gt;xaxis values= (-0.25 to +0.25 by 0.01);&lt;BR /&gt;xaxis label="Interval width (0.01)" min=-0.25;&lt;BR /&gt;keylegend "Scaled earnings" "Earnings before abnormal CFO" / across=1 position=TopRight location=Inside;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 18:17:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535674#M17795</guid>
      <dc:creator>Almutairi</dc:creator>
      <dc:date>2019-02-14T18:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dotted curve and changing the color of the under curve area</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535686#M17796</link>
      <description>&lt;P&gt;make your life simple and use the Journal style. Here is &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_odsgraph_toc.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;an overview of Statistical Graphics using ODS.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here is &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_odsgraph_sect054.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;the doc for styles and the JOURNAL family of styles.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start by putting&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods [DESTINATION] style=Journal;&lt;/P&gt;
&lt;P&gt;before your call to PROC SGPLOT and see how it looks.&lt;/P&gt;
&lt;P&gt;For example,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods html style=Journal;&lt;/P&gt;
&lt;P&gt;ods latex style=Journal;&lt;/P&gt;
&lt;P&gt;etc&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 18:40:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535686#M17796</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-02-14T18:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dotted curve and changing the color of the under curve area</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535687#M17797</link>
      <description>&lt;P&gt;First of all, you might want to check out your output if you run it using STYLE=JOURNAL2 on your ODS statement; however, the histogram will no be filled in that case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get what you requested, try the modified code below. I'm not sure it the histograms will be like you want. Just let us know:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Distributions of scaled earnings and earnings before abnormal CFO";
proc sgplot data=compu_graph_EBACFO;
histogram Lagearnings1 / binwidth=0.01 binstart= -0.25 showbins transparency=0.4 fillattrs=(color=black)
name="Scaled earnings" legendlabel="Scaled earnings";
histogram EB_ACFO / binwidth=0.01 binstart= -0.25 showbins transparency=0.5 fillattrs=(color=black) outlineattrs=(color=white)
name="Earnings before abnormal CFO" legendlabel="Earnings before abnormal CFO";
density Lagearnings1 / type=kernel lineattrs=(color=black pattern=solid)
density EB_ACFO / type=kernel lineattrs=(color=black pattern=dot)
xaxis values= (-0.25 to +0.25 by 0.01);
xaxis label="Interval width (0.01)" min=-0.25;
keylegend "Scaled earnings" "Earnings before abnormal CFO" / across=1 position=TopRight location=Inside;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 19:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535687#M17797</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-02-14T19:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dotted curve and changing the color of the under curve area</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535696#M17798</link>
      <description>&lt;P&gt;Thank you Dan for your quick response. I ran the code but I encountered some errors. See the attachment plz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 18:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535696#M17798</guid>
      <dc:creator>Almutairi</dc:creator>
      <dc:date>2019-02-14T18:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dotted curve and changing the color of the under curve area</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535698#M17799</link>
      <description>&lt;P&gt;My apologies. OUTLINEATTR control for HISTOGRAMS s available in GTL, but not currently in the SG procedures. Also, it should have been PATTERN in the LINEATTRS option, not LINEPATTERN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use SGPLOT, and still get your white outlines, you'll have to make a a small ODS style that inherits from a style like JOURNAL2. I'll create one and post back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 19:07:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535698#M17799</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-02-14T19:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dotted curve and changing the color of the under curve area</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535715#M17801</link>
      <description>&lt;P&gt;Here's a simple example using the new style. You can adapt it to your original code by just adding the LINEATTRS options to your DENSITY statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://drummer.unx.sas.com:41283/results/sastmp/SAS_work23920000348F_drummer/SGPlot1.png" border="0" alt="The SGPlot Procedure" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define style styles.MyJournal;
parent=styles.journal;

style GraphData1 from GraphData1 /
      color = cx000000;
style GraphData2 from GraphData2 /
      color = cx000000;
style GraphOutlines from GraphOutlines /
      contrastcolor = cxFFFFFF;
end;
run;

ods html style=myjournal;
proc sgplot data=sashelp.heart;
histogram weight / transparency=0.4;
histogram cholesterol / transparency=0.4;
density weight / type=kernel lineattrs=(pattern=solid);
density cholesterol / type=kernel lineattrs=(pattern=dot);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Feb 2019 19:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535715#M17801</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-02-14T19:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dotted curve and changing the color of the under curve area</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535721#M17802</link>
      <description>&lt;P&gt;Perfect. Thank u Rick as always.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 19:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535721#M17802</guid>
      <dc:creator>Almutairi</dc:creator>
      <dc:date>2019-02-14T19:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dotted curve and changing the color of the under curve area</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535722#M17803</link>
      <description>&lt;P&gt;Thanks Dan.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 19:46:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-a-dotted-curve-and-changing-the-color-of-the-under/m-p/535722#M17803</guid>
      <dc:creator>Almutairi</dc:creator>
      <dc:date>2019-02-14T19:46:15Z</dc:date>
    </item>
  </channel>
</rss>

