<?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 merge labels of X axis in lattice statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816131#M322102</link>
    <description>&lt;P&gt;sorry！try this！&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data test;
input USUBJID$	group$	aval	pchg1	pchg2	pchg3@@;
datalines;
1102	G1	22.6	41	184.2	5.5
1103	G1	0	-23.6	-42.1	11.6
1104	G1	62.8	-92.7	-79.2	-3.2
1105	G1	0	-16.2	32.6	14.5
1107	G1	0	-2.6	103.4	28.4
1108	G1	112.1	-88.4	-85.7	49.7
4201	G2	42.4	-73.6	-64.1	20
4204	G2	64.2	-51.9	-34.4	38.9
4206	G2	1	0.5	-10.3	-29.9
5001	G3	85.9	-70.6	-63.7	32.2
5002	G3	272	-89.8	-84.4	70.8
5003	G3	166.4	-80.9	-57.2	-13
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2022 03:04:28 GMT</pubDate>
    <dc:creator>zzh4434</dc:creator>
    <dc:date>2022-06-02T03:04:28Z</dc:date>
    <item>
      <title>How to merge labels of X axis in lattice statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816006#M322057</link>
      <description>&lt;P&gt;The label of axes of the three cells are the same. How to merge the labels of the&amp;nbsp; axes,like this picture!&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="微信图片_20220601151122.png" style="width: 989px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71926iF5CB6BB95E93076F/image-size/large?v=v2&amp;amp;px=999" role="button" title="微信图片_20220601151122.png" alt="微信图片_20220601151122.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this is my code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc template;                                                                
	define statgraph Series;                                                   
	begingraph;  
    layout lattice / rows=1 columns = 3 rowdatarange=UNIONALL columndatarange=unionall ;
        /* Column and row axes */
        columnaxes;
          columnaxis / display=all label="Mean Ctrough (Days 85 and 92), ng/mL"
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
         columnaxis / display=all label="Mean Ctrough (Days 85 and 92), ng/mL"
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
         columnaxis / display=all label="Mean Ctrough (Days 85 and 92), ng/mL"
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
       endcolumnaxes;
        rowaxes;
          rowaxis / label="% Change from Baseline"
					linearopts=(tickvaluesequence=(start=-100 end=200 increment=50) tickvaluepriority= true);
        endrowaxes;

        **Column 1 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "ApoC-III" /valign=top;
			scatterplot x=aval y=pchg1 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg1 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
        **Column 2 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "TG"/valign=top;
			scatterplot x=aval y=pchg1 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg1 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
        **Column 3 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "HDL-C"/valign=top;
			scatterplot x=aval y=pchg3 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg3 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
		sidebar / align=top ;
			discretelegend "group" / halign=center across=1 border=false;
		endsidebar;
	endlayout;
  endgraph;
 end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 07:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816006#M322057</guid>
      <dc:creator>zzh4434</dc:creator>
      <dc:date>2022-06-01T07:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge labels of X axis in lattice statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816009#M322059</link>
      <description>proc sgpanel data=sashelp.heart;&lt;BR /&gt;panelby bp_status/layout=columnlattice onepanel noheader novarname;&lt;BR /&gt;inset bp_status/position=top nolabel;&lt;BR /&gt;scatter x=height y=weight/group=sex;&lt;BR /&gt;run;</description>
      <pubDate>Wed, 01 Jun 2022 08:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816009#M322059</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-06-01T08:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge labels of X axis in lattice statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816046#M322068</link>
      <description>&lt;P&gt;If you want tested code you need to provide example data in form of data step code &lt;STRONG&gt;and&lt;/STRONG&gt; the Proc Sgrender code to create the graph.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 16:17:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816046#M322068</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-01T16:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge labels of X axis in lattice statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816131#M322102</link>
      <description>&lt;P&gt;sorry！try this！&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data test;
input USUBJID$	group$	aval	pchg1	pchg2	pchg3@@;
datalines;
1102	G1	22.6	41	184.2	5.5
1103	G1	0	-23.6	-42.1	11.6
1104	G1	62.8	-92.7	-79.2	-3.2
1105	G1	0	-16.2	32.6	14.5
1107	G1	0	-2.6	103.4	28.4
1108	G1	112.1	-88.4	-85.7	49.7
4201	G2	42.4	-73.6	-64.1	20
4204	G2	64.2	-51.9	-34.4	38.9
4206	G2	1	0.5	-10.3	-29.9
5001	G3	85.9	-70.6	-63.7	32.2
5002	G3	272	-89.8	-84.4	70.8
5003	G3	166.4	-80.9	-57.2	-13
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 03:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816131#M322102</guid>
      <dc:creator>zzh4434</dc:creator>
      <dc:date>2022-06-02T03:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge labels of X axis in lattice statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816134#M322105</link>
      <description>&lt;P&gt;And the Proc SGRENDER to use the template?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 03:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816134#M322105</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-02T03:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge labels of X axis in lattice statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816136#M322107</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data test;
input USUBJID$	group$	aval	pchg1	pchg2	pchg3@@;
datalines;
1102	G1	22.6	41	184.2	5.5
1103	G1	0	-23.6	-42.1	11.6
1104	G1	62.8	-92.7	-79.2	-3.2
1105	G1	0	-16.2	32.6	14.5
1107	G1	0	-2.6	103.4	28.4
1108	G1	112.1	-88.4	-85.7	49.7
4201	G2	42.4	-73.6	-64.1	20
4204	G2	64.2	-51.9	-34.4	38.9
4206	G2	1	0.5	-10.3	-29.9
5001	G3	85.9	-70.6	-63.7	32.2
5002	G3	272	-89.8	-84.4	70.8
5003	G3	166.4	-80.9	-57.2	-13
;
run;

data attrmap;
	infile datalines dlm="#";
	length Value ID MarkerSymbol MarkerColor$200;
	input Value$ ID$ MarkerSymbol$ MarkerColor$@@;
	datalines;
Monotherapy (Groups 1 and 2) # myid #CircleFilled   #blue
Fibrate Combination (Group 3)# myid #TriangleFilled #red
FCS Monotherapy (Group 4)    # myid #SquareFilled   #green
;
run;
proc sgrender data=final dattrmap=attrmap template=Series;
	dattrvar group="myid";
run;
proc template;                                                                
	define statgraph Series;                                                   
	begingraph;  
    layout lattice / rows=1 columns = 3 rowdatarange=UNIONALL columndatarange=unionall ;
        /* Column and row axes */
        columnaxes;
          columnaxis / display=all label="  "
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
         columnaxis / display=all label="Mean Ctrough (Days 85 and 92), ng/mL"
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
         columnaxis / display=all label="  "
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
       endcolumnaxes;
        rowaxes;
          rowaxis / label="% Change from Baseline"
					linearopts=(tickvaluesequence=(start=-100 end=200 increment=50) tickvaluepriority= true);
        endrowaxes;

        **Column 1 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "ApoC-III" /valign=top;
			scatterplot x=aval y=pchg1 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg1 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
        **Column 2 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "TG"/valign=top;
			scatterplot x=aval y=pchg2 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg2 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
        **Column 3 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "HDL-C"/valign=top;
			scatterplot x=aval y=pchg3 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg3 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
		sidebar / align=top ;
			discretelegend "group" / halign=center across=1 border=false;
		endsidebar;
	endlayout;
  endgraph;
 end;
run;

proc sgrender data=test dattrmap=attrmap template=Series;
dattrvar group="myid";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 05:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816136#M322107</guid>
      <dc:creator>zzh4434</dc:creator>
      <dc:date>2022-06-02T05:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge labels of X axis in lattice statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816209#M322133</link>
      <description>&lt;P&gt;I notice this template is not the same as the first shown and is basically where I would start: just provide actual label text under one column. It displays the label in only the center graph but may get truncated depending on the width of the graph created. You might try the Labelpostion=center and see if you like the look though if the width of the center graph doesn't allow enough space it will still be truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;PRE&gt;        columnaxes;
          columnaxis / display=all label="  "
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
         columnaxis / display=all label="Mean Ctrough*(Days 85 and 92)*ng/mL"
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true)
                  labelfitpolicy=splitalways labelsplitchar='*'
         ;
         columnaxis / display=all label="  "
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
       endcolumnaxes;
&lt;/PRE&gt;
&lt;P&gt;Which will split the label resulting in something similar to this on the Axis splitting the label at the positions of the inserted *:&lt;/P&gt;
&lt;PRE&gt;   Mean Ctrough
(Days 85 and 92)
      ng/mL&lt;/PRE&gt;
&lt;P&gt;Last option might be to suppress the label and use an Annotate data set to write text but that is a last choice as you may have to spend a lot of time with other options to create the space for that label to appear correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/425514"&gt;@zzh4434&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;data test;
input USUBJID$	group$	aval	pchg1	pchg2	pchg3@@;
datalines;
1102	G1	22.6	41	184.2	5.5
1103	G1	0	-23.6	-42.1	11.6
1104	G1	62.8	-92.7	-79.2	-3.2
1105	G1	0	-16.2	32.6	14.5
1107	G1	0	-2.6	103.4	28.4
1108	G1	112.1	-88.4	-85.7	49.7
4201	G2	42.4	-73.6	-64.1	20
4204	G2	64.2	-51.9	-34.4	38.9
4206	G2	1	0.5	-10.3	-29.9
5001	G3	85.9	-70.6	-63.7	32.2
5002	G3	272	-89.8	-84.4	70.8
5003	G3	166.4	-80.9	-57.2	-13
;
run;

data attrmap;
	infile datalines dlm="#";
	length Value ID MarkerSymbol MarkerColor$200;
	input Value$ ID$ MarkerSymbol$ MarkerColor$@@;
	datalines;
Monotherapy (Groups 1 and 2) # myid #CircleFilled   #blue
Fibrate Combination (Group 3)# myid #TriangleFilled #red
FCS Monotherapy (Group 4)    # myid #SquareFilled   #green
;
run;
proc sgrender data=final dattrmap=attrmap template=Series;
	dattrvar group="myid";
run;
proc template;                                                                
	define statgraph Series;                                                   
	begingraph;  
    layout lattice / rows=1 columns = 3 rowdatarange=UNIONALL columndatarange=unionall ;
        /* Column and row axes */
        columnaxes;
          columnaxis / display=all label="  "
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
         columnaxis / display=all label="Mean Ctrough (Days 85 and 92), ng/mL"
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
         columnaxis / display=all label="  "
					   linearopts=(TICKVALUELIST=(0 100 200 300 400 500 600 ) tickvaluepriority= true);
       endcolumnaxes;
        rowaxes;
          rowaxis / label="% Change from Baseline"
					linearopts=(tickvaluesequence=(start=-100 end=200 increment=50) tickvaluepriority= true);
        endrowaxes;

        **Column 1 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "ApoC-III" /valign=top;
			scatterplot x=aval y=pchg1 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg1 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
        **Column 2 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "TG"/valign=top;
			scatterplot x=aval y=pchg2 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg2 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
        **Column 3 content;
 		layout overlay;
			entry halign=center textattrs=(size=9pt) "HDL-C"/valign=top;
			scatterplot x=aval y=pchg3 /group=group  name="group" markerattrs=(size=10);
			regressionplot  x=aval y=pchg3 /lineattrs=(thickness=4 color=green) degree=3;
	    endlayout;
		sidebar / align=top ;
			discretelegend "group" / halign=center across=1 border=false;
		endsidebar;
	endlayout;
  endgraph;
 end;
run;

proc sgrender data=test dattrmap=attrmap template=Series;
dattrvar group="myid";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 15:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816209#M322133</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-02T15:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge labels of X axis in lattice statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816779#M322421</link>
      <description>&lt;P&gt;thanks，I wrote three identical columnaxes, and then assigned the labels of 1 and 3 to null. What I want is whether I can just write only one columnaxis,&lt;BR /&gt;Then the three cells all display the same x axis, and the label is displayed in the middle cell.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 01:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-merge-labels-of-X-axis-in-lattice-statement/m-p/816779#M322421</guid>
      <dc:creator>zzh4434</dc:creator>
      <dc:date>2022-06-07T01:07:19Z</dc:date>
    </item>
  </channel>
</rss>

