<?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: SGPlot Bar with min and max values in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960488#M25318</link>
    <description>&lt;P&gt;Sure. Check this:&lt;/P&gt;
&lt;PRE&gt;

proc sgplot data=elapsed_long_perc noautolegend;
    /* Definizione dei colori personalizzati per ogni fascia */
    styleattrs datacolors=(CREAM PAPPK BIOY VIGY VPAG); 

    /* Creazione del barplot senza bordi */
    vbarparm category=Fascia response=Percentuale / 
        nooutline group=Fascia limitlower=max limitupper=min limitattrs=(color=LTGRAY )
        groupdisplay=cluster;

    *scatter x=Fascia y=Percentuale /datalabel=Percentuale datalabelpos=center markerattrs=(size=0);


    /* Aggiunta delle barre di errore con maggiore spessore */
    highlow x=Fascia low=min high=max / 
        lineattrs=(thickness=3 color=LTGRAY); 

    /* Linea curva che segue i valori */
    series x=Fascia y=Percentuale / smoothconnect
        smoothconnect lineattrs=(color=LIYBR thickness=2 pattern=solid);

    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);

    /* Aggiunta delle etichette ai valori */
	text x=Fascia y=Percentuale text=Percentuale / position=left textattrs=(weight=bold  size=12) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;discreteoffset=-0.1&lt;/STRONG&gt;&lt;/FONT&gt;;
    scatter x=Fascia y=min /datalabel=min datalabelpos=center markerattrs=(size=0) datalabelattrs=(size=11  color=black) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;discreteoffset=0.2&lt;/STRONG&gt;&lt;/FONT&gt;;
    scatter x=Fascia y=max /datalabel=max datalabelpos=center markerattrs=(size=0) datalabelattrs=(size=11 weight=bold color=white) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;discreteoffset=0.2&lt;/STRONG&gt;&lt;/FONT&gt;;
/* text x=Fascia y=min text=min / position=bottomright textattrs=(size=10); */
/* text x=Fascia y=max text=max / position=topright textattrs=(size=10); */
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1740704602366.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105015i5301DBAE939746FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1740704602366.png" alt="Ksharp_0-1740704602366.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2025 01:03:34 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-02-28T01:03:34Z</dc:date>
    <item>
      <title>SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960261#M25303</link>
      <description>&lt;P&gt;Hello community,&lt;BR /&gt;&lt;BR /&gt;I would like to plot a barplot with sgplot. I am using this code to plot this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sgplot data=elapsed_long_perc;
    /* Definisci i colori personalizzati per ogni fascia */
    styleattrs datacolors=(LIO MOO STO GRRO DARO); 

/* 	vbarparm category=Fascia response=Percentuale / */
/*    limitlower=max limitupper=min; */

    /* Creazione del barplot con colori distinti per ogni fascia */
    vbar Fascia / response=Percentuale datalabel 
                  group=Fascia 
                  datalabelattrs=(size=12); 


    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);
    
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_0-1740583116213.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104956i640333125E64407E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_0-1740583116213.png" alt="harmonic_0-1740583116213.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I would like to put a line that follow my bars like that&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_1-1740583236280.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104957iF78D7B4586AC0D22/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_1-1740583236280.png" alt="harmonic_1-1740583236280.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;And put the values of min and max as an interval like that&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_2-1740583440096.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104958iD05B7F80A9E6DC91/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_2-1740583440096.png" alt="harmonic_2-1740583440096.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;or like that but with different color bars&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_3-1740583492630.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104959i2EC6BE4517578C55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_3-1740583492630.png" alt="harmonic_3-1740583492630.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you in advance&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&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>Wed, 26 Feb 2025 15:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960261#M25303</guid>
      <dc:creator>harmonic</dc:creator>
      <dc:date>2025-02-26T15:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960276#M25304</link>
      <description>&lt;P&gt;The CSV has the response values already formatted, so I couldn't try this solution out, but try the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Add a SERIES plot after the VBARPARM statement to draw the line:&lt;BR /&gt;series x=Fascia y=Percentuale / smoothconnect;&lt;/LI&gt;
&lt;LI&gt;On the VBARPARM, add GROUPDISPLAY=CLUSTER. This will allow the group colors to be applied to the bars and also display the limit bars.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 16:09:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960276#M25304</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2025-02-26T16:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960281#M25305</link>
      <description>&lt;P&gt;I am using this code&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=elapsed_long_perc;
    /* Definisci i colori personalizzati per ogni fascia */
    styleattrs datacolors=(LIO MOO STO GRRO DARO); 

	vbarparm category=Fascia response=Percentuale /
   limitlower=max limitupper=min groupdisplay=cluster;

	series x=Fascia y=Percentuale / smoothconnect;

    /* Creazione del barplot con colori distinti per ogni fascia */
/*     vbar Fascia / response=Percentuale datalabel  */
/*                   group=Fascia  */
/*                   datalabelattrs=(size=12);  */

    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);
    
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And I see this plot:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_0-1740586545905.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104960iD39897BC1CF20464/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_0-1740586545905.png" alt="harmonic_0-1740586545905.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a way to put the colors manually?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 16:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960281#M25305</guid>
      <dc:creator>harmonic</dc:creator>
      <dc:date>2025-02-26T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960288#M25306</link>
      <description>Add GROUP=Fascia to the bar chart.</description>
      <pubDate>Wed, 26 Feb 2025 16:31:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960288#M25306</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2025-02-26T16:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960298#M25307</link>
      <description>Thank you, it works! Is there a way to put the percentage values on top of the bar as well? Something like datalabel.</description>
      <pubDate>Wed, 26 Feb 2025 17:17:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960298#M25307</guid>
      <dc:creator>harmonic</dc:creator>
      <dc:date>2025-02-26T17:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960302#M25308</link>
      <description>&lt;P&gt;If the DATALABEL option does not work for you due to the limit bars, you can use a TEXT plot to put the labels on the bars. Put this after your SERIES statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;text x=Fascia y=Percentuale  text=Percentuale / position=bottom;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can use TEXTATTRS on the statement to customize the text appearance.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 17:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960302#M25308</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2025-02-26T17:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960319#M25309</link>
      <description>Is there a way to put the min and max values as well maybe smaller than the mean?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Feb 2025 18:45:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960319#M25309</guid>
      <dc:creator>harmonic</dc:creator>
      <dc:date>2025-02-26T18:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960331#M25310</link>
      <description>&lt;P&gt;There are a different ways to do this. If it were me, I would put the MIN/MAX values in an XAXISTABLE. Try add this statement and see if you like it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;xaxistable min max / position=top location=inside;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want all three on the end of the bar, it can be done with TEXT plots, but it will take more work to either determine the correct locations or do some string manipulations with your data. Try the axis table first and see what you think.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 20:07:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960331#M25310</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2025-02-26T20:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960364#M25311</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile='C:\Users\xiakeshan\Downloads\ELAPSED_LONG_PERC.csv' out=elapsed_long_perc dbms=csv replace;
run;

proc sgplot data=elapsed_long_perc;&lt;BR /&gt; styleattrs datacolors=(LIO MOO STO GRRO DARO); 
    vbarparm category=Fascia  response=Percentuale /datalabel group=Fascia groupdisplay=cluster datalabelattrs=(size=12) ; 
    series x=Fascia y=Percentuale /lineattrs=(thickness=4 color=greybb); 


    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);
    
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_2-1740625918027.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104995i877CF1132CD93536/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_2-1740625918027.png" alt="Ksharp_2-1740625918027.png" /&gt;&lt;/span&gt;&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;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc sgplot data=elapsed_long_perc;&lt;BR /&gt; styleattrs datacolors=(LIO MOO STO GRRO DARO); 
    vbarparm category=Fascia  response=Percentuale /nooutline group=Fascia ; 
    highlow x=Fascia high=max low=min /type=bar nooutline transparency=0.2 lowlabel=Percentuale labelattrs=(size=12 color=black ); 


    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);
    
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1740625908529.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104994iAB1FC5BFB0C29FAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1740625908529.png" alt="Ksharp_1-1740625908529.png" /&gt;&lt;/span&gt;&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;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc sgplot data=elapsed_long_perc;&lt;BR /&gt; styleattrs datacolors=(LIO MOO STO GRRO DARO); 
    vbarparm category=Fascia  response=Percentuale / group=Fascia groupdisplay=cluster limitlower=max limitupper=min limitattrs=(color=grey) ; 

    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);
    
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1740625899345.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104993i5B9BEC054613D5B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1740625899345.png" alt="Ksharp_0-1740625899345.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 03:12:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960364#M25311</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-27T03:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960378#M25312</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_0-1740645406504.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104998i81E1C8F9FE7F59E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_0-1740645406504.png" alt="harmonic_0-1740645406504.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to put the numbers inside the bars like that&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_1-1740645464543.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104999iA9119EE64DE71235/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_1-1740645464543.png" alt="harmonic_1-1740645464543.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 08:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960378#M25312</guid>
      <dc:creator>harmonic</dc:creator>
      <dc:date>2025-02-27T08:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960380#M25313</link>
      <description>&lt;P&gt;Sure. You want this one ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc sgplot data=elapsed_long_perc;
styleattrs datacolors=(LIO MOO STO GRRO DARO); 
    vbarparm category=Fascia  response=Percentuale /nooutline group=Fascia seglabel seglabelattrs=(size=12 color=white)  ; 
    highlow x=Fascia high=max low=min /type=bar nooutline transparency=0.2; 


    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);
    
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run; 

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1740646322856.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105000i739B31052C8F72F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1740646322856.png" alt="Ksharp_0-1740646322856.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 08:52:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960380#M25313</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-27T08:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960383#M25314</link>
      <description>&lt;P&gt;Something like that&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_0-1740646704565.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105001i34257E76F42F02A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_0-1740646704565.png" alt="harmonic_0-1740646704565.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or with tha bars like that&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_1-1740646862569.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105002iDD04C1A92B1C4BDF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_1-1740646862569.png" alt="harmonic_1-1740646862569.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this last case can I modify the width of the line?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 09:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960383#M25314</guid>
      <dc:creator>harmonic</dc:creator>
      <dc:date>2025-02-27T09:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960385#M25315</link>
      <description>Sure. But I have no time. I have to leave now.&lt;BR /&gt;Tomorrow, if I have time ,you will post a new code .</description>
      <pubDate>Thu, 27 Feb 2025 09:20:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960385#M25315</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-27T09:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960388#M25316</link>
      <description>&lt;P&gt;OK. Since I have some time:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc sgplot data=elapsed_long_perc;
styleattrs datacolors=(LIO MOO STO GRRO DARO); 
    vbarparm category=Fascia  response=Percentuale /nooutline group=Fascia    ; 
    highlow x=Fascia high=max low=min /type=bar nooutline transparency=0.2; 
    scatter x=Fascia y=Percentuale /datalabel=Percentuale datalabelpos=top markerattrs=(size=0);
    scatter x=Fascia y=min /datalabel=min datalabelpos=top markerattrs=(size=0)  ;
    scatter x=Fascia y=max /datalabel=max datalabelpos=top markerattrs=(size=0) datalabelattrs=(color=white);

    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);
    
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run; 

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1740648787590.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105003iE831EFF734A777B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1740648787590.png" alt="Ksharp_0-1740648787590.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;


proc sgplot data=elapsed_long_perc;
styleattrs datacolors=(LIO MOO STO GRRO DARO); 
    vbarparm category=Fascia  response=Percentuale / group=Fascia groupdisplay=cluster limitlower=max limitupper=min limitattrs=(color=grey) ; 
    scatter x=Fascia y=Percentuale /datalabel=Percentuale datalabelpos=center markerattrs=(size=0);
    scatter x=Fascia y=min /datalabel=min datalabelpos=center markerattrs=(size=0) ;
    scatter x=Fascia y=max /datalabel=max datalabelpos=center markerattrs=(size=0) datalabelattrs=(color=white);

    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);
    
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1740648824389.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105004i5522F2B15934A6CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1740648824389.png" alt="Ksharp_1-1740648824389.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 09:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960388#M25316</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-27T09:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960391#M25317</link>
      <description>&lt;P&gt;I custom my code like that&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sgplot data=elapsed_long_perc noautolegend;
    /* Definizione dei colori personalizzati per ogni fascia */
    styleattrs datacolors=(CREAM PAPPK BIOY VIGY VPAG); 

    /* Creazione del barplot senza bordi */
    vbarparm category=Fascia response=Percentuale / 
        nooutline group=Fascia limitlower=max limitupper=min 
        groupdisplay=cluster;

    *scatter x=Fascia y=Percentuale /datalabel=Percentuale datalabelpos=center markerattrs=(size=0);


    /* Aggiunta delle barre di errore con maggiore spessore */
    highlow x=Fascia low=min high=max / 
        lineattrs=(thickness=3 color=LTGRAY); 

    /* Linea curva che segue i valori */
    series x=Fascia y=Percentuale / 
        smoothconnect lineattrs=(color=LIYBR thickness=2 pattern=solid);

    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);

    /* Aggiunta delle etichette ai valori */
	text x=Fascia y=Percentuale text=Percentuale / position=left textattrs=(weight=bold  size=12);
    scatter x=Fascia y=min /datalabel=min datalabelpos=center markerattrs=(size=0) datalabelattrs=(size=11  color=black);;
    scatter x=Fascia y=max /datalabel=max datalabelpos=center markerattrs=(size=0) datalabelattrs=(size=11 weight=bold color=white);
/* text x=Fascia y=min text=min / position=bottomright textattrs=(size=10); */
/* text x=Fascia y=max text=max / position=topright textattrs=(size=10); */
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And I obtained this plot&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harmonic_0-1740650402188.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105005i5D48D99A8913E784/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harmonic_0-1740650402188.png" alt="harmonic_0-1740650402188.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Is there the offset option to move the percentage values a little bit?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 10:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960391#M25317</guid>
      <dc:creator>harmonic</dc:creator>
      <dc:date>2025-02-27T10:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: SGPlot Bar with min and max values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960488#M25318</link>
      <description>&lt;P&gt;Sure. Check this:&lt;/P&gt;
&lt;PRE&gt;

proc sgplot data=elapsed_long_perc noautolegend;
    /* Definizione dei colori personalizzati per ogni fascia */
    styleattrs datacolors=(CREAM PAPPK BIOY VIGY VPAG); 

    /* Creazione del barplot senza bordi */
    vbarparm category=Fascia response=Percentuale / 
        nooutline group=Fascia limitlower=max limitupper=min limitattrs=(color=LTGRAY )
        groupdisplay=cluster;

    *scatter x=Fascia y=Percentuale /datalabel=Percentuale datalabelpos=center markerattrs=(size=0);


    /* Aggiunta delle barre di errore con maggiore spessore */
    highlow x=Fascia low=min high=max / 
        lineattrs=(thickness=3 color=LTGRAY); 

    /* Linea curva che segue i valori */
    series x=Fascia y=Percentuale / smoothconnect
        smoothconnect lineattrs=(color=LIYBR thickness=2 pattern=solid);

    /* Personalizzazione degli assi */
    yaxis label="Variazione Percentuale (%)" labelattrs=(size=14) valueattrs=(size=12);
    xaxis label="Frequenza pedonale annuale" discreteorder=data labelattrs=(size=14) valueattrs=(size=12);

    /* Aggiunta delle etichette ai valori */
	text x=Fascia y=Percentuale text=Percentuale / position=left textattrs=(weight=bold  size=12) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;discreteoffset=-0.1&lt;/STRONG&gt;&lt;/FONT&gt;;
    scatter x=Fascia y=min /datalabel=min datalabelpos=center markerattrs=(size=0) datalabelattrs=(size=11  color=black) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;discreteoffset=0.2&lt;/STRONG&gt;&lt;/FONT&gt;;
    scatter x=Fascia y=max /datalabel=max datalabelpos=center markerattrs=(size=0) datalabelattrs=(size=11 weight=bold color=white) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;discreteoffset=0.2&lt;/STRONG&gt;&lt;/FONT&gt;;
/* text x=Fascia y=min text=min / position=bottomright textattrs=(size=10); */
/* text x=Fascia y=max text=max / position=topright textattrs=(size=10); */
    /* Titolo del grafico */
    title height=14pt "Variazione Elapsed medio rispetto a 2 volte all'anno";
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1740704602366.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105015i5301DBAE939746FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1740704602366.png" alt="Ksharp_0-1740704602366.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 01:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPlot-Bar-with-min-and-max-values/m-p/960488#M25318</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-28T01:03:34Z</dc:date>
    </item>
  </channel>
</rss>

