<?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: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965229#M25455</link>
    <description>That is because you are using simulation data by RAND() funtion:&lt;BR /&gt;Score = round(40 + ranuni(0)*60, 0.1);&lt;BR /&gt;Therefore, each time you are running code,you would get different data and would see different length of box .</description>
    <pubDate>Mon, 28 Apr 2025 02:14:43 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-04-28T02:14:43Z</dc:date>
    <item>
      <title>How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965144#M25444</link>
      <description>&lt;P&gt;I am Learning the proc template. I tried to create a box plot with sashelp.cars. I've got to make it 80% of what I am thinking , I am&amp;nbsp; stuck at the last 20 % to finish. Looking for help. My code creates&amp;nbsp; graph correctly but stuck at creating the legend. Present graph only show the group legends text in legends, but&lt;/P&gt;&lt;P&gt;1. I want to add the number of to the legends text to display the counts. like (SUV-Asia (N= 25)). I tried creating the macro variable for counts and attach to the group., but it messing up my graph.&lt;/P&gt;&lt;P&gt;2. Is it possible to&amp;nbsp; to diplay all the Asia related in one column, USA in another column, and Europe in another columns in Legends&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StudentSASLearn_1-1745630179158.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106529i7886279E7E49CBA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StudentSASLearn_1-1745630179158.png" alt="StudentSASLearn_1-1745630179158.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is my cars code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;*create data;

proc sql;
    create table car_subjects as
    select distinct 
        cats(Make, "-", Model) as USUBJID length=50,
        Type as CarType length=15,
        Origin as Region length=15,
        Horsepower,
        Weight,
        MPG_City,
        MPG_Highway,
        MSRP
    from sashelp.cars
    where Make is not null and Model is not null;
quit;

*get Count to display in legend;

proc sql;
    create table car_counts as
    select CarType, Region, count(*) as N
    from car_subjects
    group by CarType, Region;
quit;

* Add count to dataset;

proc sort data=car_subjects;
    by CarType Region;
run;

proc sort data=car_counts;
    by CarType Region;
run;

/* Step 4: Merge and build final dummy dataset */
*try with few groups first;
data dummy_cars_final ( where = (region in ('USA' 'Asia' 'Europe') and cartype in ('SUV' 'Sedan' 'Truck')));
    merge car_subjects(in=a) car_counts;
    by CarType Region;
    if a;

    /* Derived variables */
    region_type = catx("-", CarType, Region);

    Score = round(40 + ranuni(0)*60, 0.1);

    PowerIndex = round((Horsepower * 0.6 + Weight * 0.0005), 0.1);

    EcoScore = round((MPG_City * 0.4 + MPG_Highway * 0.6), 0.1);

    length LuxuryLevel $10;
    if MSRP &amp;gt; 50000 then LuxuryLevel = "High";
    else if MSRP &amp;gt; 30000 then LuxuryLevel = "Medium";
    else LuxuryLevel = "Low";

    drop Horsepower Weight MPG_City MPG_Highway MSRP;
run;

proc template;
   define statgraph boxplot_template;
      begingraph;

         discreteattrmap name="comboMap" / ignorecase=true;
            value "SUV-Asia" / fillattrs=(color=orange);
            value "SUV-Europe" / fillattrs=(color=orange) ;
			value "SUV-USA" / fillattrs=(color=orange) ;
            value "Sedan-Asia" / fillattrs=(color=magenta) ;
            value "Sedan-Europe" / fillattrs=(color=orange);
            value "Sedan-USA" / fillattrs=(color=magenta);
            value "Truck-Asia" / fillattrs=(color=grey) ;
            value "Truck-USA" / fillattrs=(color=grey);
         enddiscreteattrmap;

         discreteattrvar attrvar=patgroup var=region_type attrmap='comboMap';

         layout lattice / rows=2 columns=1 columndatarange=union ROWWEIGHTS=(.75 .25) ;
            layout overlay / 
               xaxisopts=(label="Region" labelattrs=(size=12pt weight=bold)
                          tickvalueattrs=(size=12pt weight=bold))
               yaxisopts=(offsetmin=0.05 offsetmax=0.05 label="Rating Score"  
                          linearopts=(tickvaluesequence=(start=0 end=100 increment=10)));

               boxplot x=region y=score /
                  name='BoxLegend'
                  group=patgroup 
                  groupdisplay=cluster 
                  boxwidth=0.6 clusterwidth=0.5 
                  display=( median mean caps fillpattern ) 
                  medianattrs=(pattern=1);


            endlayout;

			discretelegend 'BoxLegend' / 
			      border=false 
			      valueattrs=(size=8pt weight = bold) 
			      across=3 location=inside valign=top  ;
            endlayout;

      endgraph;
   end;
run;

proc template;
   define style styles.mypatterns;
      parent=styles.listing;
      style GraphData1 from GraphData1 / fillpattern="R1" ;
      style GraphData2 from GraphData2 / fillpattern="X1" ;
      style GraphData3 from GraphData3 / fillpattern="E" ;
      style GraphData4 from GraphData4 / fillpattern="R1" ;
      style GraphData5 from GraphData5 / fillpattern="X1" ;
      style GraphData6 from GraphData6 / fillpattern="E" ;
      style GraphData7 from GraphData7 / fillpattern="R1" ;
      style GraphData8 from GraphData8 / fillpattern="X1" ;
      style GraphData9 from GraphData9/ fillpattern="E" ;
   end;
run;



options orientation=landscape;
ods rtf file="boxplot_grouped.rtf" style=mypatterns;
ods graphics / reset width=8.5in height=5.5in border=off;

proc sgrender data=Dummy_cars_final template=boxplot_template;
run;

ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2025 01:19:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965144#M25444</guid>
      <dc:creator>StudentSASLearn</dc:creator>
      <dc:date>2025-04-26T01:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965150#M25445</link>
      <description>&lt;P&gt;Could you use PROC SGPLOT ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
    create table car_subjects as
    select distinct 
        cats(Make, "-", Model) as USUBJID length=50,
        Type as CarType length=15,
        Origin as Region length=15,
        Horsepower,
        Weight,
        MPG_City,
        MPG_Highway,
        MSRP
    from sashelp.cars
    where Make is not null and Model is not null;
quit;

*get Count to display in legend;

proc sql;
    create table car_counts as
    select CarType, Region, count(*) as N
    from car_subjects
    group by CarType, Region;
quit;

* Add count to dataset;

proc sort data=car_subjects;
    by CarType Region;
run;

proc sort data=car_counts;
    by CarType Region;
run;

/* Step 4: Merge and build final dummy dataset */
*try with few groups first;
data dummy_cars_final ( where = (region in ('USA' 'Asia' 'Europe') and cartype in ('SUV' 'Sedan' 'Truck')));
    merge car_subjects(in=a) car_counts;
    by CarType Region;
    if a;
call streaminit(123);
    /* Derived variables */
    region_type = catx("-", CarType, Region);

    Score = round(40 + ranuni(0)*60, 0.1);

    PowerIndex = round((Horsepower * 0.6 + Weight * 0.0005), 0.1);

    EcoScore = round((MPG_City * 0.4 + MPG_Highway * 0.6), 0.1);

    length LuxuryLevel $10;
    if MSRP &amp;gt; 50000 then LuxuryLevel = "High";
    else if MSRP &amp;gt; 30000 then LuxuryLevel = "Medium";
    else LuxuryLevel = "Low";

    drop Horsepower Weight MPG_City MPG_Highway MSRP;
run;


proc sql;
create table dummy_cars_final2 as
select region_type,score,region,cats(region_type,'(N=',count(*),')') as region_type2 from dummy_cars_final
 group by region_type
union
/*create a dummy "Truck-Europe"*/
select "Truck-Europe",score,region,region_type from dummy_cars_final
 where region_type='Sedan-Europe'
;
quit;


/*Mask the  dummy "Truck-Europe" box and legend*/
%sganno
data sganno;
 %SGRECTANGLE( X1=52,Y1=4.4,HEIGHT=3,WIDTH=24,DRAWSPACE="GRAPHPERCENT" ,FILLCOLOR="white" ,DISPLAY="FILL",FILLTRANSPARENCY=0 )
run;


ods graphics /attrpriority=none ;
proc sgplot data=dummy_cars_final2 sganno=sganno;
styleattrs  DATAFILLPATTERNS=(R1 X1 L1 R1 X1 L1 R1 X1 L1)
datacontrastcolors=(red blue orange green navy darkred  purple white black);
  vbox score /category=region name='x' 
                  group=region_type2 
                  groupdisplay=cluster 
                  boxwidth=0.6 clusterwidth=0.5 
                  fillpattern nofill
                  medianattrs=(pattern=1) nooutliers;
  keylegend 'x'/title='';
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-1745640506175.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106531iDF2F7056A5E1CD16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1745640506175.png" alt="Ksharp_0-1745640506175.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2025 04:08:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965150#M25445</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-26T04:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965151#M25446</link>
      <description>&lt;P&gt;Thank you very much for your response. Is it possible to do in proc template? Or impossible?. Also can we make each region same color but different pattern in patterns and contrast color options.You have very great knowledge.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2025 06:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965151#M25446</guid>
      <dc:creator>StudentSASLearn</dc:creator>
      <dc:date>2025-04-26T06:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965156#M25447</link>
      <description>&lt;P&gt;Yes. I believe GTL is able to do that. But I have a limited knowledge of GTL. Maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;&amp;nbsp; could give you some help.&lt;/P&gt;
&lt;P&gt;Anyway, here is something you could start with:&lt;/P&gt;
&lt;P&gt;and you need to change the order of region_type2 to make your requirement happen.&lt;/P&gt;
&lt;PRE&gt;proc sql;
    create table car_subjects as
    select distinct 
        cats(Make, "-", Model) as USUBJID length=50,
        Type as CarType length=15,
        Origin as Region length=15,
        Horsepower,
        Weight,
        MPG_City,
        MPG_Highway,
        MSRP
    from sashelp.cars
    where Make is not null and Model is not null;
quit;

*get Count to display in legend;

proc sql;
    create table car_counts as
    select CarType, Region, count(*) as N
    from car_subjects
    group by CarType, Region;
quit;

* Add count to dataset;

proc sort data=car_subjects;
    by CarType Region;
run;

proc sort data=car_counts;
    by CarType Region;
run;

/* Step 4: Merge and build final dummy dataset */
*try with few groups first;
data dummy_cars_final ( where = (region in ('USA' 'Asia' 'Europe') and cartype in ('SUV' 'Sedan' 'Truck')));
    merge car_subjects(in=a) car_counts;
    by CarType Region;
    if a;

    /* Derived variables */
    region_type = catx("-", CarType, Region);

    Score = round(40 + ranuni(0)*60, 0.1);

    PowerIndex = round((Horsepower * 0.6 + Weight * 0.0005), 0.1);

    EcoScore = round((MPG_City * 0.4 + MPG_Highway * 0.6), 0.1);

    length LuxuryLevel $10;
    if MSRP &amp;gt; 50000 then LuxuryLevel = "High";
    else if MSRP &amp;gt; 30000 then LuxuryLevel = "Medium";
    else LuxuryLevel = "Low";

    drop Horsepower Weight MPG_City MPG_Highway MSRP;
run;

proc template;
   define statgraph boxplot_template;
      begingraph/ATTRPRIORITY=NONE ;

         discreteattrmap name="comboMap" / ignorecase=true;
		    value "SUV-Asia(N=25)" / lineattrs=(color=orange ) markerattrs=(color=blue symbol=diamond) ;
            value "SUV-Europe(N=10)" / lineattrs=(color=magenta)  markerattrs=(color=blue symbol=diamond);
			value "SUV-USA(N=25)" / lineattrs=(color=grey)   markerattrs=(color=blue symbol=diamond);
            value "Sedan-Asia(N=94)" / lineattrs=(color= orange) markerattrs=(color=green symbol=circle) ;
            value "Sedan-Europe(N=78)" / lineattrs=(color=magenta) markerattrs=(color=green symbol=circle);
            value "Sedan-USA(N=90)" / lineattrs=(color=grey) markerattrs=(color=green symbol=circle);
            value "Truck-Asia(N=8)" / lineattrs=(color= orange) markerattrs=(color=red symbol=plus);
			value "&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Truck-Europe(N=0)&lt;/STRONG&gt;&lt;/FONT&gt;" / lineattrs=(color=white) markerattrs=(color=white symbol=plus);
			value "Truck-USA(N=16)" / lineattrs=(color=grey) markerattrs=(color=red symbol=plus);

         enddiscreteattrmap;




         discreteattrvar attrvar=patgroup var=region_type2 attrmap='comboMap';

         layout lattice / rows=2 columns=1 columndatarange=union ROWWEIGHTS=(.75 .25) ;
            layout overlay / 
               xaxisopts=(label="Region" labelattrs=(size=12pt weight=bold)
                          tickvalueattrs=(size=12pt weight=bold))
               yaxisopts=(offsetmin=0.05 offsetmax=0.05 label="Rating Score"  
                          linearopts=(tickvaluesequence=(start=0 end=100 increment=10)));

               boxplot x=region y=score /
                  name='BoxLegend'
                  group=patgroup 
                  groupdisplay=cluster 
                  boxwidth=0.6 clusterwidth=0.5 
                  display=( median mean caps fillpattern ) 
                  ;

annotate / id="BAR";

            endlayout;

			discretelegend 'BoxLegend' / 
			      border=false 
			      valueattrs=(size=8pt weight = bold) 
			      across=3 location=inside valign=top  ;
            endlayout;

      endgraph;
   end;
run;

proc template;
   define style styles.mypatterns;
      parent=styles.listing;
      style GraphData1 from GraphData1 / fillpattern="R1" ;
      style GraphData2 from GraphData2 / fillpattern="X1" ;
      style GraphData3 from GraphData3 / fillpattern="L1" ;
      style GraphData4 from GraphData4 / fillpattern="R1" ;
      style GraphData5 from GraphData5 / fillpattern="X1" ;
      style GraphData6 from GraphData6 / fillpattern="L1" ;
      style GraphData7 from GraphData7 / fillpattern="R1" ;
      style GraphData8 from GraphData8 / fillpattern="X1" ;
      style GraphData9 from GraphData9/ fillpattern="L1" ;
   end;
run;


proc sql;
create table dummy_cars_final2 as
select region_type,score,region,cats(region_type,'(N=',count(*),')') as region_type2 from dummy_cars_final
 group by region_type
union
/*create a dummy "Truck-Europe"*/
select "Truck-Europe",score,region,"&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Truck-Europe(N=0)&lt;/STRONG&gt;&lt;/FONT&gt;" from dummy_cars_final
 where region_type='Sedan-Europe'
;
quit;

/*Mask the  dummy "Truck-Europe" box and legend*/
%sganno
data sganno;
 %SGRECTANGLE(ID="BAR", X1=52,Y1=10,HEIGHT=4,WIDTH=15,DRAWSPACE="GRAPHPERCENT" ,FILLCOLOR="white" ,DISPLAY="FILL",FILLTRANSPARENCY=0 )

run;


options orientation=landscape;
ods rtf file="c:\temp\boxplot_grouped.rtf" style=mypatterns;
ods graphics / reset width=8.5in height=5.5in border=off outputfmt=png;

proc sgrender data=Dummy_cars_final2 template=boxplot_template sganno=sganno;
run;

ods rtf close;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1745670483139.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106532iC02344ADA4FCA7D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1745670483139.png" alt="Ksharp_0-1745670483139.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2025 12:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965156#M25447</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-26T12:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965164#M25448</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;. Thank you very much. You guys are SAS AIs. Do much faster and perfectly.&amp;nbsp; I will wait if&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628" target="_blank" rel="noopener"&gt;@tc&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; refines or gives any suggestions. Otherwise, I am happy with the output and will mark it as a Solution. However, I have two questions about the code.&amp;nbsp; If it's not inconvenient, can you please shed some light on it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. At the following step, can I create the macro variable for count that you did in SGPLOT and present it (N= &amp;amp;x1.)? Will it be dynamic, or will it cause me any problems?&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;    value "SUV-Asia&lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;(N=25)&lt;/STRONG&gt;&lt;/FONT&gt;" / lineattrs=(color=orange ) markerattrs=(color=blue symbol=diamond) ; &lt;FONT color="#008000"&gt;This is Resolved I was able to do it.&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;2. I see you using two macros , I don't see these are local macros, are those available everyone with SAS 9.4 like default macros? if not can you please direct a link where I can read about please. thank you again for your time.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;%SGRECTANGLE&lt;/PRE&gt;&lt;PRE&gt;%sganno&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2025 16:34:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965164#M25448</guid>
      <dc:creator>StudentSASLearn</dc:creator>
      <dc:date>2025-04-26T16:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965186#M25449</link>
      <description>&lt;P&gt;I am not expert about GTL. So maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;&amp;nbsp; &amp;nbsp;could give you better solution.&lt;/P&gt;
&lt;P&gt;About your question:&lt;/P&gt;
&lt;P&gt;1)Yes. you need to create macro variable for these count to make the code dynamic. Here is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
    create table car_subjects as
    select distinct 
        cats(Make, "-", Model) as USUBJID length=50,
        Type as CarType length=15,
        Origin as Region length=15,
        Horsepower,
        Weight,
        MPG_City,
        MPG_Highway,
        MSRP
    from sashelp.cars
    where Make is not null and Model is not null;
quit;

*get Count to display in legend;

proc sql;
    create table car_counts as
    select CarType, Region, count(*) as N
    from car_subjects
    group by CarType, Region;
quit;

* Add count to dataset;

proc sort data=car_subjects;
    by CarType Region;
run;

proc sort data=car_counts;
    by CarType Region;
run;

/* Step 4: Merge and build final dummy dataset */
*try with few groups first;
data dummy_cars_final ( where = (region in ('USA' 'Asia' 'Europe') and cartype in ('SUV' 'Sedan' 'Truck')));
    merge car_subjects(in=a) car_counts;
    by CarType Region;
    if a;

    /* Derived variables */
    region_type = catx("-", CarType, Region);

    Score = round(40 + ranuni(0)*60, 0.1);

    PowerIndex = round((Horsepower * 0.6 + Weight * 0.0005), 0.1);

    EcoScore = round((MPG_City * 0.4 + MPG_Highway * 0.6), 0.1);

    length LuxuryLevel $10;
    if MSRP &amp;gt; 50000 then LuxuryLevel = "High";
    else if MSRP &amp;gt; 30000 then LuxuryLevel = "Medium";
    else LuxuryLevel = "Low";

    drop Horsepower Weight MPG_City MPG_Highway MSRP;
run;





&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;
proc sql;
create table dummy_cars_final2 as
select region_type,score,region,cats(region_type,'(N=',count(*),')') as region_type2 from dummy_cars_final
 group by region_type
union
/*create a dummy "Truck-Europe"*/
select "Truck-Europe",score,region,"Truck-Europe(N=0)" from dummy_cars_final
 where region_type='Sedan-Europe'
;
quit;
proc freq data=dummy_cars_final2 noprint;
table region_type2/out=levels;
run;
data _null_;
set levels;
call symputx('_'||compress(scan(region_type2,1,'()'),,'kad') ,region_type2 );
run;
&lt;/STRONG&gt;&lt;/FONT&gt;


proc template;
   define statgraph boxplot_template;
      begingraph/ATTRPRIORITY=NONE ;

         discreteattrmap name="comboMap" / ignorecase=true;
		    value &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"&amp;amp;_SUVAsia"&lt;/STRONG&gt;&lt;/FONT&gt; / lineattrs=(color=orange ) markerattrs=(color=blue symbol=diamond) ;
            value &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"&amp;amp;_SUVEurope"&lt;/STRONG&gt;&lt;/FONT&gt; / lineattrs=(color=magenta)  markerattrs=(color=blue symbol=diamond);
			value "&amp;amp;_SUVUSA" / lineattrs=(color=grey)   markerattrs=(color=blue symbol=diamond);
            value "&amp;amp;_SedanAsia" / lineattrs=(color= orange) markerattrs=(color=green symbol=circle) ;
            value "&amp;amp;_SedanEurope" / lineattrs=(color=magenta) markerattrs=(color=green symbol=circle);
            value "&amp;amp;_SedanUSA" / lineattrs=(color=grey) markerattrs=(color=green symbol=circle);
            value "&amp;amp;_TruckAsia" / lineattrs=(color= orange) markerattrs=(color=red symbol=plus);
			value "&amp;amp;_TruckEurope" / lineattrs=(color=white) markerattrs=(color=white symbol=plus);
			value "&amp;amp;_TruckUSA" / lineattrs=(color=grey) markerattrs=(color=red symbol=plus);

         enddiscreteattrmap;




         discreteattrvar attrvar=patgroup var=region_type2 attrmap='comboMap';

         layout lattice / rows=2 columns=1 columndatarange=union ROWWEIGHTS=(.75 .25) ;
            layout overlay / 
               xaxisopts=(label="Region" labelattrs=(size=12pt weight=bold)
                          tickvalueattrs=(size=12pt weight=bold))
               yaxisopts=(offsetmin=0.05 offsetmax=0.05 label="Rating Score"  
                          linearopts=(tickvaluesequence=(start=0 end=100 increment=10)));

               boxplot x=region y=score /
                  name='BoxLegend'
                  group=patgroup 
                  groupdisplay=cluster 
                  boxwidth=0.6 clusterwidth=0.5 
                  display=( median mean caps fillpattern ) 
                  ;

annotate / id="BAR";

            endlayout;

			discretelegend 'BoxLegend' / 
			      border=false 
			      valueattrs=(size=8pt weight = bold) 
			      across=3 location=inside valign=top  ;
            endlayout;

      endgraph;
   end;
run;

proc template;
   define style styles.mypatterns;
      parent=styles.listing;
      style GraphData1 from GraphData1 / fillpattern="R1" ;
      style GraphData2 from GraphData2 / fillpattern="X1" ;
      style GraphData3 from GraphData3 / fillpattern="L1" ;
      style GraphData4 from GraphData4 / fillpattern="R1" ;
      style GraphData5 from GraphData5 / fillpattern="X1" ;
      style GraphData6 from GraphData6 / fillpattern="L1" ;
      style GraphData7 from GraphData7 / fillpattern="R1" ;
      style GraphData8 from GraphData8 / fillpattern="X1" ;
      style GraphData9 from GraphData9/ fillpattern="L1" ;
   end;
run;



/*Mask the  dummy "Truck-Europe" box and legend*/
%sganno
data sganno;
 %SGRECTANGLE(ID="BAR", X1=52,Y1=10,HEIGHT=4,WIDTH=15,DRAWSPACE="GRAPHPERCENT" ,FILLCOLOR="white" ,DISPLAY="FILL",FILLTRANSPARENCY=0 )

run;


options orientation=landscape;
ods rtf file="c:\temp\boxplot_grouped.rtf" style=mypatterns;
ods graphics / reset width=8.5in height=5.5in border=off outputfmt=png;

proc sgrender data=Dummy_cars_final2 template=boxplot_template sganno=sganno;
run;

ods rtf close;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Yes. These two macros are sas built-in macro ,no need to download and complie them any more.&lt;/P&gt;
&lt;P&gt;The attempt of these two macro is to mask the dummy data ' Truck-Europe', if you don't have it, you would got&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1745716454917.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106547i7F6BFAD00217A779/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1745716454917.png" alt="Ksharp_0-1745716454917.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is doc(it is very powerful tool for statistic graphics)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n0eben23mwnl3dn1cm95zbks0eea.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n0eben23mwnl3dn1cm95zbks0eea.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;p.s. to be honest, it is really not easy for me to solve such kind of GTL question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Apr 2025 01:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965186#M25449</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-27T01:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965209#M25450</link>
      <description>Thank you for clarifying all my questions. You are diamond filled with sas knowledge. I really appreciate your time .</description>
      <pubDate>Sun, 27 Apr 2025 16:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965209#M25450</guid>
      <dc:creator>StudentSASLearn</dc:creator>
      <dc:date>2025-04-27T16:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965212#M25451</link>
      <description>&lt;P&gt;Thank you again&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;. Adding Dan, if we can refine it, I can see a lot of responses from him, while searching here for the answer&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp; can you please help.&lt;/P&gt;&lt;P&gt;1. Is there a way I can keep colors of the Bars remains same, but change the patterns based on the 'Cartype' Like Asia (orange)-- and three 'Cartypes' have three different patterns, Europe is Pink and have same pattern as Asian Cartypes.&lt;/P&gt;&lt;P&gt;2. Create a Discreet legend where all Asia comes in one column, Europe comes in one&amp;nbsp; column and same for USA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Apr 2025 22:34:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965212#M25451</guid>
      <dc:creator>StudentSASLearn</dc:creator>
      <dc:date>2025-04-27T22:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965219#M25452</link>
      <description>&lt;P&gt;For you first question, you could change pattern as this:&lt;/P&gt;
&lt;PRE&gt;proc template;
   define style styles.mypatterns;
      parent=styles.listing;
      style GraphData1 from GraphData1 / fillpattern="R1" ;
      style GraphData2 from GraphData2 / fillpattern="R1" ;
      style GraphData3 from GraphData3 / fillpattern="R1" ;
      style GraphData4 from GraphData4 / fillpattern="X1" ;
      style GraphData5 from GraphData5 / fillpattern="X1" ;
      style GraphData6 from GraphData6 / fillpattern="X1" ;
      style GraphData7 from GraphData7 / fillpattern="L1" ;
      style GraphData8 from GraphData8 / fillpattern="L1" ;
      style GraphData9 from GraphData9/ fillpattern="L1" ;
   end;
run;
&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1745803367656.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106557i7FFC912B473AF642/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1745803367656.png" alt="Ksharp_0-1745803367656.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;For your second question, I also would like to know&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp; &amp;nbsp;and&amp;nbsp;@tc&amp;nbsp; have more trick way to manipulate the legend item of box plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 01:25:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965219#M25452</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-28T01:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965225#M25453</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;. I think when we try to change the group or color, the values change&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StudentSASLearn_1-1745805749571.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106559iF6BF2C4DD26A6C37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StudentSASLearn_1-1745805749571.png" alt="StudentSASLearn_1-1745805749571.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;. I don't know enough, but the value for the TRUCK-ASIA&amp;nbsp; seems bar length changed in different versions.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StudentSASLearn_0-1745805700680.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106558i5CEA8D4035BAD8E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StudentSASLearn_0-1745805700680.png" alt="StudentSASLearn_0-1745805700680.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 02:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965225#M25453</guid>
      <dc:creator>StudentSASLearn</dc:creator>
      <dc:date>2025-04-28T02:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965228#M25454</link>
      <description>&lt;P&gt;As an alternative to using a legend, what about associating the N values directly with the boxes?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=sashelp.cars;
    panelby origin / layout=columnlattice onepanel novarname uniscale=row proportional;
    vbox horsepower / category=type displaystats=(n);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-04-27 at 10.01.39 PM.png" style="width: 754px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106560i6951491160E39963/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-04-27 at 10.01.39 PM.png" alt="Screenshot 2025-04-27 at 10.01.39 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 02:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965228#M25454</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2025-04-28T02:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965229#M25455</link>
      <description>That is because you are using simulation data by RAND() funtion:&lt;BR /&gt;Score = round(40 + ranuni(0)*60, 0.1);&lt;BR /&gt;Therefore, each time you are running code,you would get different data and would see different length of box .</description>
      <pubDate>Mon, 28 Apr 2025 02:14:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965229#M25455</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-28T02:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965230#M25456</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp; for your response.&amp;nbsp; I think&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp; answered a similar question about displaying the N in response to another member.&amp;nbsp; I was thinking more of using proc template ( as I came so far into this, otherwise I am happy with using SGPLOT or PANEL).&amp;nbsp; I think at least I am stuck at bringing the same color legends into one column without affecting the graph.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 02:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965230#M25456</guid>
      <dc:creator>StudentSASLearn</dc:creator>
      <dc:date>2025-04-28T02:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965231#M25457</link>
      <description>&lt;P&gt;Oh completely forgot that. Sorry.&amp;nbsp; Thank you for point out. Thought it was taking the different grouping into the boxplot for some reason. I can not thank you enough.&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 02:17:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965231#M25457</guid>
      <dc:creator>StudentSASLearn</dc:creator>
      <dc:date>2025-04-28T02:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965232#M25458</link>
      <description>DanH,&lt;BR /&gt;I would like to know how to manipulate the legend item of box plot with pattern ,and is unable to use LEGENDITEM statement(no pattern legend item).</description>
      <pubDate>Mon, 28 Apr 2025 02:24:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965232#M25458</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-28T02:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965367#M25463</link>
      <description>&lt;P&gt;Oh wow, So much intricacy.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/471969"&gt;@StudentSASLearn&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;. Is there any option in the template if we want to apply the pattern and fill the box with colors simultaneously? I see a pattern in the Styles section here.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 16:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965367#M25463</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2025-04-29T16:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965370#M25464</link>
      <description>&lt;P&gt;Yes, just adding FILL to the DISPLAY option on the BOXPLOT statement will turn on fill colors:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;display=( median mean caps fillpattern fill)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Apr 2025 16:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965370#M25464</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2025-04-29T16:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965373#M25465</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;, can we customize the fill colors ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 17:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965373#M25465</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2025-04-29T17:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965402#M25470</link>
      <description>&lt;P&gt;Check this:&lt;/P&gt;
&lt;PRE&gt;  discreteattrmap name="comboMap" / ignorecase=true;
		    value "&amp;amp;_SUVAsia" / lineattrs=(color=orange ) markerattrs=(color=blue symbol=diamond) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;FILLATTRS=(color=red)&lt;/STRONG&gt;&lt;/FONT&gt; ;
            value "&amp;amp;_SUVEurope" / lineattrs=(color=magenta)  markerattrs=(color=blue symbol=diamond) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;FILLATTRS=(color=yellow)&lt;/STRONG&gt;&lt;/FONT&gt;;
			value "&amp;amp;_SUVUSA" / lineattrs=(color=grey)   markerattrs=(color=blue symbol=diamond) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;FILLATTRS=(color=navy)&lt;/STRONG&gt;&lt;/FONT&gt;;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Apr 2025 01:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965402#M25470</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-30T01:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display the Counts in the Discrete Legends for Box Plot in Proc Template.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965570#M25476</link>
      <description>&lt;P&gt;Thank you Very much.&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 01:57:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Display-the-Counts-in-the-Discrete-Legends-for-Box-Plot/m-p/965570#M25476</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2025-05-02T01:57:03Z</dc:date>
    </item>
  </channel>
</rss>

