<?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 SGSCATTER:  MATRIX plot is missing tick values when used with option DIOGANAL=(histogram) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983119#M25799</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;/*Example 1*/
ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='sepallength' noborder width=80px height=80px;
ods html exclude sgplot;   
/*generate a histogram graph*/
title;
proc sgplot data=sashelp.iris pad=0  noborder noautolegend;
histogram sepallength ;
xaxis display=none;
yaxis display=none;
run;

ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='petallength' noborder width=80px height=80px;
ods html exclude sgplot;   
/*generate a histogram graph*/
title;
proc sgplot data=sashelp.iris pad=0  noborder noautolegend;
histogram petallength ;
xaxis display=none;
yaxis display=none;
run;



%sganno
data sganno;
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\sepallength.png",ANCHOR="topleft",BORDER="FALSE",DRAWSPACE="LAYOUTPERCENT" ,x1=6,y1=93)
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\petallength.png",ANCHOR="topleft",BORDER="FALSE",DRAWSPACE="LAYOUTPERCENT" ,x1=54,y1=48)
run;

ods graphics/reset;
proc sgscatter data=sashelp.iris sganno=sganno;
  title "Scatterplot Matrix for Iris Data";
  matrix sepallength petallength;
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-1770371187829.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113038i1854D345DE183BEF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1770371187829.png" alt="Ksharp_0-1770371187829.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2026 09:46:37 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2026-02-06T09:46:37Z</dc:date>
    <item>
      <title>PROC SGSCATTER:  MATRIX plot is missing tick values when used with option DIOGANAL=(histogram)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983096#M25793</link>
      <description>&lt;P&gt;Hello Community,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;While creating matrix plot using the option DIOGANAL=(histogram), tick values are disappearing . Trying to use GTL to modify the template, but don't see any available options in the tmplout-generated code or sas documentations. TEMPLATES with/out tick values don't differ.&amp;nbsp;&lt;BR /&gt;Is there any SG or GTL option available for the MATRIX statement to display tick values even when using DIOGANAL=(histogram) option?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Please see the below examples.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. Tick values displayed without DIOGANAL=(histogram) option.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sgscatter data=sashelp.iris tmplout='C:\Users\Desktop\matrix1.sas';
  title "Scatterplot Matrix for Iris Data";
  matrix sepallength petallength;
run;
title;&lt;/PRE&gt;
&lt;P&gt;the tmplout created template is:&lt;/P&gt;
&lt;PRE&gt;proc template;
define statgraph sgscatter;
begingraph / designwidth=640 designheight=640;
EntryTitle "Scatterplot Matrix for Iris Data" /;
layout lattice / pad=(top=5);
    ScatterPlotMatrix SepalLength PetalLength / subpixel=off NAME="MATRIX";
endlayout;
endgraph;
end;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;2. Tick values disappeared with DIOGANAL=(histogram) option.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sgscatter data=sashelp.iris tmplout='C:\Users\Desktop\matrix2.sas';
  title "Scatterplot Matrix for Iris Data";
  matrix sepallength petallength/diagonal=(histogram);
run;
title;&lt;/PRE&gt;
&lt;P&gt;the tmplout created template is:&lt;/P&gt;
&lt;PRE&gt;proc template;
define statgraph sgscatter;
begingraph / designwidth=640 designheight=640 subpixel=on;
EntryTitle "Scatterplot Matrix for Iris Data" /;
layout lattice / pad=(top=5);
    ScatterPlotMatrix SepalLength PetalLength / subpixel=off NAME="MATRIX" diagonal=( histogram );
endlayout;
endgraph;
end;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2026 16:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983096#M25793</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2026-02-05T16:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGSCATTER:  MATRIX plot is missing tick values when used with option DIOGANAL=(histogram)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983098#M25794</link>
      <description>&lt;P&gt;Unfortunately, there is not a good way to achieve what you requested. The histograms have different axis ranges from the scatter plots, so the unified external row/column axes around the matrix cannot be created without negatively impacting the visual. The best you could do would be to create a Layout Lattice in GTL and, using internal axes, add the scatter plots and histograms in the desired order.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2026 17:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983098#M25794</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2026-02-05T17:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGSCATTER:  MATRIX plot is missing tick values when used with option DIOGANAL=(histogram)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983119#M25799</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;/*Example 1*/
ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='sepallength' noborder width=80px height=80px;
ods html exclude sgplot;   
/*generate a histogram graph*/
title;
proc sgplot data=sashelp.iris pad=0  noborder noautolegend;
histogram sepallength ;
xaxis display=none;
yaxis display=none;
run;

ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='petallength' noborder width=80px height=80px;
ods html exclude sgplot;   
/*generate a histogram graph*/
title;
proc sgplot data=sashelp.iris pad=0  noborder noautolegend;
histogram petallength ;
xaxis display=none;
yaxis display=none;
run;



%sganno
data sganno;
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\sepallength.png",ANCHOR="topleft",BORDER="FALSE",DRAWSPACE="LAYOUTPERCENT" ,x1=6,y1=93)
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\petallength.png",ANCHOR="topleft",BORDER="FALSE",DRAWSPACE="LAYOUTPERCENT" ,x1=54,y1=48)
run;

ods graphics/reset;
proc sgscatter data=sashelp.iris sganno=sganno;
  title "Scatterplot Matrix for Iris Data";
  matrix sepallength petallength;
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-1770371187829.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113038i1854D345DE183BEF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1770371187829.png" alt="Ksharp_0-1770371187829.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 09:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983119#M25799</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-02-06T09:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGSCATTER:  MATRIX plot is missing tick values when used with option DIOGANAL=(histogram)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983138#M25801</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;, it's very helpful!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 20:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983138#M25801</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2026-02-06T20:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGSCATTER:  MATRIX plot is missing tick values when used with option DIOGANAL=(histogram)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983140#M25802</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;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for the code, yes this looks like what I needed. Could we drop tick markers around histograms and add labels in the x- and y-axis, like in the example plot below?&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGScatter.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113040i1102E27D587B115B/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGScatter.png" alt="SGScatter.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 20:35:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983140#M25802</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2026-02-06T20:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGSCATTER:  MATRIX plot is missing tick values when used with option DIOGANAL=(histogram)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983186#M25803</link>
      <description>&lt;P&gt;OK. This one ?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Example 2*/
ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='sepallength' noborder width=77px height=77px;
ods html exclude sgplot;   
/*generate a histogram graph*/
title;
proc sgplot data=sashelp.iris pad=0  noborder noautolegend;
histogram sepallength ;
xaxis display=none;
yaxis display=none;
run;

ods listing gpath="%sysfunc(pathname(work))" image_dpi=300 style=htmlblue;
ods graphics / reset=all imagename='petallength' noborder width=77px height=77px;
ods html exclude sgplot;   
/*generate a histogram graph*/
title;
proc sgplot data=sashelp.iris pad=0  noborder noautolegend;
histogram petallength ;
xaxis display=none;
yaxis display=none;
run;



%sganno
data sganno;
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\sepallength.png",ANCHOR="topleft",BORDER="FALSE",DRAWSPACE="LAYOUTPERCENT" ,x1=5,y1=94)
%SGIMAGE(IMAGE="%sysfunc(pathname(work))\petallength.png",ANCHOR="topleft",BORDER="FALSE",DRAWSPACE="LAYOUTPERCENT" ,x1=51,y1=48)

/*get rid of the tick markers around histogram*/
%SGRECTANGLE(X1=10,
     Y1=91.9,
     HEIGHT=2,
     WIDTH=40,
     ANCHOR="TOPLEFT"  ,
     DISPLAY="FILL" ,  /*DISPLAY="ALL"*/
     DRAWSPACE="GRAPHPERCENT",
     FILLCOLOR="white" ,
     HEIGHTUNIT="PERCENT" ,
     WIDTHUNIT="PERCENT" 
     )
%SGRECTANGLE(X1=8.1,
     Y1=90,
     HEIGHT=40,
     WIDTH=2,
     ANCHOR="TOPLEFT"  ,
     DISPLAY="FILL" ,  /*DISPLAY="ALL"*/
     DRAWSPACE="GRAPHPERCENT",
     FILLCOLOR="white" ,
     HEIGHTUNIT="PERCENT" ,
     WIDTHUNIT="PERCENT" 
     )
%SGRECTANGLE(X1=50,
     Y1=10.2,
     HEIGHT=2,
     WIDTH=40,
     ANCHOR="TOPLEFT"  ,
     DISPLAY="FILL" ,  /*DISPLAY="ALL"*/
     DRAWSPACE="GRAPHPERCENT",
     FILLCOLOR="white" ,
     HEIGHTUNIT="PERCENT" ,
     WIDTHUNIT="PERCENT" 
     )
%SGRECTANGLE(X1=89.8,
     Y1=50,
     HEIGHT=40,
     WIDTH=2,
     ANCHOR="TOPLEFT"  ,
     DISPLAY="FILL" ,  /*DISPLAY="ALL"*/
     DRAWSPACE="GRAPHPERCENT",
     FILLCOLOR="white" ,
     HEIGHTUNIT="PERCENT" ,
     WIDTHUNIT="PERCENT" 
     )

/*Add X an Y variable label*/
 %SGTEXT(
     LABEL="Sepal Length (mm)",
	 WIDTH=40,
     WIDTHUNIT= "PERCENT" ,
     ANCHOR="CENTER" ,
     BORDER="FALSE",
     DRAWSPACE="GRAPHPERCENT",
     TEXTSIZE=12,
     X1=30,
     Y1=95
     )
 %SGTEXT(
     LABEL="Petal Length (mm)",
	 WIDTH=40,
     WIDTHUNIT= "PERCENT" ,
     ANCHOR="CENTER" ,
     BORDER="FALSE",
     DRAWSPACE="GRAPHPERCENT",
     TEXTSIZE=12,
     X1=70,
     Y1=95
     )

 %SGTEXT(
     ROTATE=90,
     LABEL="Sepal Length (mm)",
	 WIDTH=40,
     WIDTHUNIT= "PERCENT" ,
     ANCHOR="CENTER" ,
     BORDER="FALSE",
     DRAWSPACE="GRAPHPERCENT",
     TEXTSIZE=12,
     X1=4,
     Y1=75
     )
 %SGTEXT(
     ROTATE=90,
     LABEL="Petal Length (mm)",
	 WIDTH=40,
     WIDTHUNIT= "PERCENT" ,
     ANCHOR="CENTER" ,
     BORDER="FALSE",
     DRAWSPACE="GRAPHPERCENT",
     TEXTSIZE=12,
     X1=4,
     Y1=25
     )

run;

ods graphics/reset;
title;
proc sgscatter data=sashelp.iris sganno=sganno pad=40px;
  matrix sepallength petallength;
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-1770451628779.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113073i12A4E845BFFB4DA3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1770451628779.png" alt="Ksharp_0-1770451628779.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Feb 2026 08:07:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983186#M25803</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-02-07T08:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGSCATTER:  MATRIX plot is missing tick values when used with option DIOGANAL=(histogram)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983201#M25805</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;, whith you&amp;nbsp;&lt;SPAN&gt;nothing seems impossible in SAS &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 14:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGSCATTER-MATRIX-plot-is-missing-tick-values-when-used-with/m-p/983201#M25805</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2026-02-09T14:44:29Z</dc:date>
    </item>
  </channel>
</rss>

