BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Ksharp
Super User

Sure. Check this:


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) discreteoffset=-0.1;
    scatter x=Fascia y=min /datalabel=min datalabelpos=center markerattrs=(size=0) datalabelattrs=(size=11  color=black) discreteoffset=0.2;
    scatter x=Fascia y=max /datalabel=max datalabelpos=center markerattrs=(size=0) datalabelattrs=(size=11 weight=bold color=white) discreteoffset=0.2;
/* 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;

Ksharp_0-1740704602366.png

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 15 replies
  • 5676 views
  • 11 likes
  • 3 in conversation