<?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 sgpanel: is datalabel supposed to work with limitlower and limitupper? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840264#M23228</link>
    <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.cars noprint nway;
	var msrp;
	class Origin type;
	output out=cars_summary mean= uclm= lclm= /autoname;
run;

data for_plot;
	set sashelp.cars cars_summary;
run;

proc sgpanel data=for_plot;
	panelby Origin /layout=columnlattice;
	vbarparm category=type response=MSRP_Mean /name='a';
	scatter x=type y=MSRP/ jitter name='b';
	highlow x=type low=MSRP_LCLM high=MSRP_UCLM /LOWLABEL=MSRP_LCLM HIGHLABEL=MSRP_UCLM
HIGHCAP=SERIF LOWCAP=SERIF LINEATTRS=(color=red) LABELATTRS=(color=red);
keylegend  'a' 'b';
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-1666616875737.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76487i23ED3FBA6043DEA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1666616875737.png" alt="Ksharp_0-1666616875737.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2022 13:07:39 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-10-24T13:07:39Z</dc:date>
    <item>
      <title>proc sgpanel: is datalabel supposed to work with limitlower and limitupper?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840252#M23227</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a bargraph in which a scatter plot is overlaid with a bar graph. The bar graph is supposed to represent the geometric mean, and the error bars the lower and upper confidence limits of the mean. I used scatter and vbarparm statemens to achieve that, together with a dataset with precomputed values stacked under the raw dataset.&lt;/P&gt;&lt;P&gt;Unfortunately, the vbarparm does not seem to like having datalabel together with limitlower and limitupper, I am getting the following error (not sure where German is coming from, other messages are in English):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;NOTE: Die Option DATALABEL= wird im Fehlerbalken nicht unterstützt. Das Etikett wird nicht erstellt.&lt;/LI-SPOILER&gt;&lt;P&gt;This is odd as the documentation indirectly implies that the options are compatible:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;If you also specify LIMITLOWER or LIMITUPPER, then the limit labels are also shown. Prior to SAS 9.4M5, limit labels are shown when you use DATALABEL or DATALABEL=variable with the limit options. Starting with SAS 9.4M5, limit labels are shown only when you use DATALABEL (without a variable).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here is the example code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc summary data=sashelp.cars noprint nway;
	var msrp;
	class Origin Make;
	output out=cars_summary mean= uclm= lclm= /autoname;
run;

data for_plot;
	set sashelp.cars cars_summary;
run;

proc sgpanel data=for_plot;
	panelby Origin /layout=columnlattice;
	vbarparm category=Make response=MSRP_Mean / datalabel limitlower=MSRP_LCLM limitupper=MSRP_UCLM;
	scatter x=Make y=MSRP/ jitter;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is this supposed to work? If not, how can I overlay the geometric mean values on top of the panel?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 12:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840252#M23227</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2022-10-24T12:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgpanel: is datalabel supposed to work with limitlower and limitupper?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840264#M23228</link>
      <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.cars noprint nway;
	var msrp;
	class Origin type;
	output out=cars_summary mean= uclm= lclm= /autoname;
run;

data for_plot;
	set sashelp.cars cars_summary;
run;

proc sgpanel data=for_plot;
	panelby Origin /layout=columnlattice;
	vbarparm category=type response=MSRP_Mean /name='a';
	scatter x=type y=MSRP/ jitter name='b';
	highlow x=type low=MSRP_LCLM high=MSRP_UCLM /LOWLABEL=MSRP_LCLM HIGHLABEL=MSRP_UCLM
HIGHCAP=SERIF LOWCAP=SERIF LINEATTRS=(color=red) LABELATTRS=(color=red);
keylegend  'a' 'b';
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-1666616875737.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76487i23ED3FBA6043DEA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1666616875737.png" alt="Ksharp_0-1666616875737.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 13:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840264#M23228</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-24T13:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgpanel: is datalabel supposed to work with limitlower and limitupper?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840265#M23229</link>
      <description>&lt;P&gt;I want the label to show the (geometric) mean, not the confidence limits.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 13:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840265#M23229</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2022-10-24T13:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgpanel: is datalabel supposed to work with limitlower and limitupper?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840273#M23230</link>
      <description>&lt;P&gt;Why not calculate it and plot it ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.cars noprint nway;
	var msrp;
	class Origin type;
	output out=cars_summary mean= uclm= lclm= /autoname;
run;
proc univariate data=sashelp.cars noprint outtable=cars_summary2(keep=Origin type _GEOMEAN_);
	var msrp;
	class Origin type;
run;

data for_plot;
	set sashelp.cars cars_summary cars_summary2;
	if type=:'S';
run;

proc sgpanel data=for_plot;
	panelby Origin /layout=columnlattice;
	vbarparm category=type response=MSRP_Mean ;
	scatter x=type y=MSRP/ jitter transparency=0.8;
	scatter x=type y=_GEOMEAN_/markerattrs=(symbol=circlefilled color=red) datalabel=_GEOMEAN_;
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-1666618210967.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76492i78EAA0EF862F654B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1666618210967.png" alt="Ksharp_0-1666618210967.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 13:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840273#M23230</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-24T13:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgpanel: is datalabel supposed to work with limitlower and limitupper?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840279#M23231</link>
      <description>&lt;P&gt;It is even simpler, thank you for pointing me towards highlow:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc summary data=sashelp.cars noprint nway;
	var msrp;
	class Origin Type;
	output out=cars_summary mean= uclm= lclm= /autoname;
run;

data for_plot;
	set sashelp.cars cars_summary;
run;

proc sgpanel data=for_plot;
	panelby Origin /layout=columnlattice;
	vbarparm category=Type response=MSRP_Mean / datalabel;
	scatter x=Type y=MSRP/ jitter;
	highlow x=Type low=MSRP_LCLM high=MSRP_UCLM;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Oct 2022 13:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgpanel-is-datalabel-supposed-to-work-with-limitlower-and/m-p/840279#M23231</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2022-10-24T13:42:28Z</dc:date>
    </item>
  </channel>
</rss>

