<?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: change font of histogram graph (proc univariate) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767504#M21964</link>
    <description>It is actually possible to calculate those values, and add them to the data step, and then display those values with the INSET statement in Proc SGPLOT.&lt;BR /&gt;You're welcome.</description>
    <pubDate>Mon, 13 Sep 2021 18:01:34 GMT</pubDate>
    <dc:creator>djrisks</dc:creator>
    <dc:date>2021-09-13T18:01:34Z</dc:date>
    <item>
      <title>change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767491#M21959</link>
      <description>&lt;P&gt;Hi every one, I'm trying to change the font of histogram graph (axis label, ticks label,...) in&amp;nbsp;proc univariate (from standard font to "Courier New" for example).&lt;/P&gt;&lt;P&gt;I just search and find out that in&amp;nbsp;histogram statement, there are options with font like "font=options" and "infont=options"&lt;/P&gt;&lt;P&gt;I try all these options but nothing happens.&lt;/P&gt;&lt;P&gt;So how can I change the font in&amp;nbsp; proc univariate?&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 17:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767491#M21959</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-09-13T17:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767495#M21960</link>
      <description>&lt;P&gt;"Nothing happens" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the "&amp;lt;/&amp;gt;"&amp;nbsp; icon to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. 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"&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;</description>
      <pubDate>Mon, 13 Sep 2021 17:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767495#M21960</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-13T17:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767497#M21961</link>
      <description>&lt;P&gt;Sorry about my poor explanation,&lt;/P&gt;&lt;P&gt;"Nothing happens" is that even if I try to use "font=options",&amp;nbsp;the&amp;nbsp;standard&amp;nbsp;font&amp;nbsp;does&amp;nbsp;not&amp;nbsp;change&lt;/P&gt;&lt;P&gt;My code is something like that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on /OUTPUTFMT=png;
ods select histogram;
Proc univariate data=WORK.MYEXCEL;
	Var AGEVAR;
	Histogram AGEVAR / kernel normal font="Courier New" infont="Courier New"
		odstitle="Distribution of Age (in year) at Screening" ;
	inset n mean median stddev / pos=ne;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It can run without any warning or error but the font is still the standard one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 17:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767497#M21961</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-09-13T17:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767498#M21962</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/383618"&gt;@James_Yu&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you use the SGPLOT procedure to create your histogram? Because it's fairly simple to change the font there. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.heart;&lt;BR /&gt;title "Cholesterol Distribution";&lt;BR /&gt;histogram cholesterol;&lt;BR /&gt;density cholesterol;&lt;BR /&gt;density cholesterol / type=kernel;&lt;BR /&gt;keylegend / location=inside position=topright;&lt;BR /&gt;xaxis label = "Cholesterol" labelattrs=(size=12 weight=bold family="Courier New");&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;Otherwise if you want to use Proc Univariate, you will probably need to use a template to make the font change.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 17:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767498#M21962</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2021-09-13T17:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767502#M21963</link>
      <description>&lt;P&gt;Thanks for the idea&lt;/P&gt;&lt;P&gt;But I still need some statistics in the graph that the proc univariate could provide such as in inset statement (n mean median stddev) and Mu/Sigma in the label of the density curves&lt;/P&gt;&lt;P&gt;How can I display these&amp;nbsp;statistics in the graph with proc&amp;nbsp;&lt;SPAN&gt;SGPLOT ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 17:56:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767502#M21963</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-09-13T17:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767504#M21964</link>
      <description>It is actually possible to calculate those values, and add them to the data step, and then display those values with the INSET statement in Proc SGPLOT.&lt;BR /&gt;You're welcome.</description>
      <pubDate>Mon, 13 Sep 2021 18:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767504#M21964</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2021-09-13T18:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767507#M21965</link>
      <description>FONT= option is for standard graphics - ie not ODS GRAPHICS. &lt;BR /&gt;It's under the section titled : Options for Traditional Graphics Output&lt;BR /&gt;&lt;BR /&gt;Basically it's a historical option, you need to either modify the template or use SGPLOT instead to get around this easily</description>
      <pubDate>Mon, 13 Sep 2021 18:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767507#M21965</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-13T18:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767510#M21966</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/383618"&gt;@James_Yu&lt;/a&gt;&amp;nbsp;, here is a style which has been modified. You can use this style template to obtain the Courier New font, and you can make some more modifications. It probably will take a bit of trial and error for you to understand how each part affects the plot:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before the Proc Univariate statement you will need to use ODS LISTING STYLE = STYLES.NEW_STYLE, and you should look at the outputted image file (as opposed to the file in SAS), because the changes will be there.&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.new_style;
  parent = styles.default;
  style GraphFonts from  GraphFonts
      /
      'NodeDetailFont' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",7pt)
      'NodeLinkLabelFont' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",9pt)
      'NodeInputLabelFont' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",9pt)
      'NodeLabelFont' = ("Courier New",9pt)
      'NodeTitleFont' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",9pt)
      'GraphDataFont' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",7pt)
      'GraphUnicodeFont' = ("Courier New",9pt)
      'GraphValueFont' = ("Courier New",9pt)
      'GraphLabel2Font' = ("Courier New",15pt)
      'GraphLabelFont' = ("Courier New",15pt,bold)
      'GraphFootnoteFont' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",10pt)
      'GraphTitleFont' = ("Courier New",11pt,bold)
      'GraphTitle1Font' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",14pt, bold)
      'GraphAnnoFont' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",10pt);
  end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Sep 2021 18:22:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767510#M21966</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2021-09-13T18:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767512#M21967</link>
      <description>Thanks a lot for this information</description>
      <pubDate>Mon, 13 Sep 2021 18:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767512#M21967</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-09-13T18:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: change font of histogram graph (proc univariate)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767513#M21968</link>
      <description>&lt;P&gt;Thanks a lot for the solution.&lt;/P&gt;&lt;P&gt;I will test this&lt;SPAN&gt;&amp;nbsp;style template to see that if it could help me to achieve my goal&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 18:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/change-font-of-histogram-graph-proc-univariate/m-p/767513#M21968</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-09-13T18:28:19Z</dc:date>
    </item>
  </channel>
</rss>

