<?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: proc sgplot, truncated tick values when using multiple formats in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928102#M24620</link>
    <description>&lt;P&gt;Have a look at the following code sample. Two format are created, the first one is used for the ordering of the bars, the second one is used to label the tick marks. Note that the second format uses the formatted values as the input value. No truncation takes place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value $sex 
    'M'='1Male'
    'F'='2Female'
  ;
  value $sextick 
    '1Male'='Männlich'
    '2Female'='Weiblich'
  ;
run;

title "just format statement";
proc sgplot data=sashelp.class noborder;
  vbarbasic sex;
  xaxis discreteorder=formatted 
/*    valuesformat=$sextick.*/
  ;
  format sex $sex.;
run;
title;

title "with valuesformat";
proc sgplot data=sashelp.class noborder;
  vbarbasic sex;
  xaxis discreteorder=formatted 
    valuesformat=$sextick.
  ;
  format sex $sex.;
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 13 May 2024 11:51:10 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2024-05-13T11:51:10Z</dc:date>
    <item>
      <title>proc sgplot, truncated tick values when using multiple formats</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928049#M24618</link>
      <description>&lt;P&gt;Please correct me if I miss something because just right now the example is a typical example showing how graph can make the user mad.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example two formats are used; one is assigned to the variable using the format statement ; the other one is set using the option tickvalueformat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My original thought was that tickvalueformat would have priority over the variable format to set the tickvalues and that the variable format would be used to set the order of the bars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, in this example, we can see that the tick values are coming from the format assigned to the variable, but the format width is coming from the format given in the tickvalueformat option. As the default format label with of the sex format is 6, tick values are truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    value $sex 'M'='Male'
               'F'='Female';
    value $sexnum 'M'='1-Male'
                  'F'='2-Female';
              
run;
    
proc sgplot data=sashelp.class noborder;
    vbarbasic sex; 
    
    xaxis discreteorder=formatted tickvalueformat=$sex.;
    
    format sex $sexnum.;
run;
    
proc sgplot data=sashelp.class noborder;
    vbarbasic sex; 
    
    xaxis discreteorder=formatted tickvalueformat=$sex20.;
    
    format sex $sexnum.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2024 15:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928049#M24618</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2024-05-12T15:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot, truncated tick values when using multiple formats</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928102#M24620</link>
      <description>&lt;P&gt;Have a look at the following code sample. Two format are created, the first one is used for the ordering of the bars, the second one is used to label the tick marks. Note that the second format uses the formatted values as the input value. No truncation takes place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value $sex 
    'M'='1Male'
    'F'='2Female'
  ;
  value $sextick 
    '1Male'='Männlich'
    '2Female'='Weiblich'
  ;
run;

title "just format statement";
proc sgplot data=sashelp.class noborder;
  vbarbasic sex;
  xaxis discreteorder=formatted 
/*    valuesformat=$sextick.*/
  ;
  format sex $sex.;
run;
title;

title "with valuesformat";
proc sgplot data=sashelp.class noborder;
  vbarbasic sex;
  xaxis discreteorder=formatted 
    valuesformat=$sextick.
  ;
  format sex $sex.;
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 May 2024 11:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928102#M24620</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2024-05-13T11:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot, truncated tick values when using multiple formats</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928104#M24621</link>
      <description>&lt;P&gt;Fun fact,&amp;nbsp;the SGPLOT/XAXIS documentation does not mention about the&amp;nbsp;tickvalueformat= option at all. The&amp;nbsp;tickvalueformat= is only documented in GTL reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 12:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928104#M24621</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-05-13T12:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot, truncated tick values when using multiple formats</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928154#M24622</link>
      <description>Thanks. So the format in valuesformat= applies to the formatted values and not to the unformatted values. My mind would never have imagine this construct. It's clear now.</description>
      <pubDate>Mon, 13 May 2024 15:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928154#M24622</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2024-05-13T15:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot, truncated tick values when using multiple formats</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928155#M24623</link>
      <description>Thanks.</description>
      <pubDate>Mon, 13 May 2024 15:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-truncated-tick-values-when-using-multiple-formats/m-p/928155#M24623</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2024-05-13T15:52:54Z</dc:date>
    </item>
  </channel>
</rss>

