<?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: Plot multiple x-y relations with 3D-tilt in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/726275#M21144</link>
    <description>&lt;P&gt;Thank you so much - this is exciting.&lt;/P&gt;&lt;P&gt;If I managed to get this running, I assume, I can give up the "tilt" and plot the densities that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am missing just one step, as I am too dumb to figure out how to plot the densities exactly on the corresponding lines (they are shifted upwards).&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data	in1;
	input	x	t1 t2 t3;
	datalines;
		0.05	0.1	0.05	0.001
		0.1	0.2	0.1	0.001
		0.15	0.2	0.1	0.001
		0.2	0.3	0.4	0.01
		0.25	0.4	0.4	0.02
		0.3	0.5	0.5	0.05
		0.35	1	1	0.1
		0.4	2	2	3
		0.45	2.5	3	4
		0.5	3	4.5	6
		0.55	2.5	3	4
		0.6	2	2	3
		0.65	1	1	0.1
		0.7	0.5	0.5	0.05
		0.75	0.4	0.4	0.02
		0.8	0.3	0.4	0.01
		0.85	0.2	0.1	0.001
		0.9	0.2	0.1	0.001
		0.95	0.1	0.05	0.001
	;
run;
%macro	rearranger1;
	%DO		i	=	1	%TO			3;
	data	_&amp;amp;i.
			;
		set		in1
					(
						keep		=
											x
											t&amp;amp;i.
						rename		=
							(
								t&amp;amp;i.		=		y
							)
							
					)
				;
				s	=	&amp;amp;i.	;
	run;
	%END;
	data	in2
			;
		set	
			_:
			;
	run;
	proc	sql		noprint;
		select
			max(y)	as	maxy
		into
			:maxy
			separated	by	' '
		from
			in2
			;
	quit;	
	data	in3
			;
		set
			in2
			;
		s0	=	s;
		s	=	s	*	ceil(&amp;amp;maxy.);
		y	=	y	+	s;
	run;

%mend	rearranger1;
%rearranger1;



%LET		scaling	=		0.1;	
data	in4;
	set			in3;
		y_with_offset	=	s0	-	(y*&amp;amp;scaling);
run;



proc sgplot
		data				=			in4
		;
		band
			x				=			x
			upper			=			3 
			lower			=			y_with_offset
		/
			group			=			s0
			;
		yaxis
			display			=	
				(
					noline
					noticks
					nolabel
				)
			reverse
			offsetmin		=		.1
 			values			=
				(
					0 to 3 by 1
				)
 			valuesdisplay	=
				(
					'' '1' '2' '3'
				)
			;
	xaxis
			display			=	
				(
					noline
				) 
 			values			=
				(
					0 to 1.0 by .1
				)
			;
run; quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="have3.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55951i960B834A71A81AA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="have3.PNG" alt="have3.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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 13:19:05 GMT</pubDate>
    <dc:creator>Sinistrum</dc:creator>
    <dc:date>2021-03-15T13:19:05Z</dc:date>
    <item>
      <title>Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/724863#M21111</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would please like to ask for your help concerning the following issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a nutshell, I want to create a graph akin to this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="want1.PNG" style="width: 650px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55728i460896EBCBC8B812/image-dimensions/650x333?v=v2" width="650" height="333" role="button" title="want1.PNG" alt="want1.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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is, I have, as a data set, a discrete approximation of n probability-density functions (here, n=3).&lt;/P&gt;&lt;P&gt;I want to plot them such that they do not appear "on top of each other", but with a 3D-tilt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Plotting "on top of each other" I achieved via &lt;FONT face="courier new,courier"&gt;proc gplot&lt;/FONT&gt;. However, I do not know how to tackle my current issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be great, if you could please provide help with respect to how achieve my goal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample-Code is embedded in the spoiler;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data	in1;
	input	x	t1 t2 t3;
	datalines;
		0.05	0.1	0.05	0.001
		0.1	0.2	0.1	0.001
		0.15	0.2	0.1	0.001
		0.2	0.3	0.4	0.01
		0.25	0.4	0.4	0.02
		0.3	0.5	0.5	0.05
		0.35	1	1	0.1
		0.4	2	2	3
		0.45	2.5	3	4
		0.5	3	4.5	6
		0.55	2.5	3	4
		0.6	2	2	3
		0.65	1	1	0.1
		0.7	0.5	0.5	0.05
		0.75	0.4	0.4	0.02
		0.8	0.3	0.4	0.01
		0.85	0.2	0.1	0.001
		0.9	0.2	0.1	0.001
		0.95	0.1	0.05	0.001
	;
run;

	symbol1
		interpol		=			join 
		value			=			DiamondFilled 
		color			=			black 
		height			=			0.25;      
	symbol2
		interpol		=			join 
		value			=			DiamondFilled 
		color			=			blue 
		height			=			0.25;                                                                         
	symbol3
		interpol		=			join 
		value			=			DiamondFilled 
		color			=			orange 
		height			=			0.25;                                                                         
 	axis1
		label			=			("x") 
		minor			=			none 
		value			=			(color=black angle=45)
		;      
	axis2
		label			=			(angle=90 "\phi(x)")
		minor			=			(n=1);  
	proc	gplot
		data	=	in1
					;
		plot (t1 t2 t3)* x
		/
		overlay
			haxis	=	axis1
			vaxis	=	axis2
		;
	run; quit;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;Yours sincerely,&lt;BR /&gt;Sinistrum&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 14:34:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/724863#M21111</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2021-03-09T14:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/724887#M21112</link>
      <description>&lt;P&gt;I might suggest Proc G3d. Use your current values as Z, add a Y value to create a different baseline for each distribution.&lt;/P&gt;
&lt;P&gt;Then you have the Rotate and Tilt angle list options to create different appearance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead of t1, t2, t3 etc, those would be Z axis dimension with Y=1 , 2, 3.&lt;/P&gt;
&lt;P&gt;Something like this may get you started.&lt;/P&gt;
&lt;PRE&gt;data plot;
   set in1;
   array t(*) t1-t3;
   do y=1 to dim(t);
      z= t[y];
      output;
   end;
   keep x y z;
run;

proc g3d data=plot;
   plot y*x=z /
     rotate= (0 to 25 by 5)
     
   ;
run;
quit;&lt;/PRE&gt;
&lt;P&gt;The Rotate is just an example that will generate 5 different graphs. You can play with different angles to get an appearance you like. Or Tilt. If you use both then pairs of angles from each list are used.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 15:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/724887#M21112</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-09T15:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/724928#M21113</link>
      <description>&lt;P&gt;First, let me ask the "tough love" questions ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What question would you like for this graph to answer? ... And is a tilted 3d perspective graph the best way to answer those questions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 18:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/724928#M21113</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-03-09T18:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725102#M21114</link>
      <description>&lt;P&gt;Thank you very much indeed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc	g3d
	data		=			plot
							;
   	plot 		y * x = z
	/
     rotate	=	(315)
	 XYTYPE	=	2
	 CAXIS 	=	black
   ;
run;	quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;, I am as far as follows, which is one step closer to the desired outcome:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="have1.PNG" style="width: 377px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55758i28C34DBC851D1723/image-dimensions/377x256?v=v2" width="377" height="256" role="button" title="have1.PNG" alt="have1.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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I need to consider, though &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=graphref&amp;amp;docsetTarget=n17v6b90qsbjz1n16wqtuol0pic5.htm&amp;amp;locale=en" target="_self"&gt;cannot find&lt;/A&gt; ...&lt;/P&gt;&lt;P&gt;a way to change the colouring of the three different plots;&lt;/P&gt;&lt;P&gt;adjust point thickness (points so far are not displayed at all, just connecting lines).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be great, if, given someone has a clue on this, provide help once again, please.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 11:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725102#M21114</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2021-03-10T11:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725106#M21118</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did not want to clutter the post with too much of application-specific information / keep the code as "minimum-working-example-ish" as possible, though, given your question, I add more background; I am curious as to what you think and it certainly will help me to delineate my issues verbally.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This graph I would like to answer the question: "&lt;EM&gt;How do conditional density estimates develop over time, indexed by t + τ, for τ ranging from one to five, by one.&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;In my application, I &lt;A href="https://www.sciencedirect.com/science/article/abs/pii/S0304407619302416" target="_self"&gt;obtain conditional density estimates&lt;/A&gt;, for a dependent variable, which lies τ periods ahead of the regressors in the regressor matrix.&lt;/P&gt;&lt;P&gt;Certain theories in "the" field imply certain stochastic processes for the dependent variable, suggesting a certain conditional distribution respectively a certain development towards something akin to an equilibrium state over time, given the regressors (admittedly, I am redundant with the "given the regressors", though, repetita iuvant).&lt;/P&gt;&lt;P&gt;In addition to (hopefully more rigorous) econometric tests, I would like to gauge by eye-balling, whether the estimates of densities I obtain give rise to the assumption that the specifications I implement are consistent with said theoretical considerations.&lt;/P&gt;&lt;P&gt;As τ ranges from one to five (as of now - it might well be for the interval's upper bound to increase in the wake of empirical analysis), plotting all densities on top of each other I consider as too cluttered (at least I am to dump to disentangle all the lines/colors/what not). Plotting them tilted, at least I hope and expect, would give a better feel on which regions of the density develop in which manner.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 11:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725106#M21118</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2021-03-10T11:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725115#M21119</link>
      <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 12:22:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725115#M21119</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-03-10T12:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725151#M21120</link>
      <description>&lt;P&gt;As an alternative to your original request, how about a comparative panel display like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Density.png" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55767iD72372927DA40F40/image-size/large?v=v2&amp;amp;px=999" role="button" title="Density.png" alt="Density.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would stack all five density curves for easy comparison. The code for this would be something like the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / reset width=480px height=640px imagename="Density";

proc sgpanel data=sashelp.class noautolegend;
panelby sex / layout=rowlattice onepanel novarname;
density weight / type=kernel;
/* series x=x y=y / smoothconnect; */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In your case, you would use the SERIES statement instead of the DENSITY statement to display your results, as you have already pre-computed them. You would also substitute your "z" variable for the "sex" variable on the PANELBY statement. Use the WIDTH and HEIGHT options to control the aspect of the graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 14:18:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725151#M21120</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-03-10T14:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725441#M21126</link>
      <description>&lt;P&gt;Depending on your application, you might want to look at the discussion and code at&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2015/09/16/plot-distrib-exp.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2015/09/16/plot-distrib-exp.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 13:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725441#M21126</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-03-11T13:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725456#M21127</link>
      <description>&lt;P&gt;Thank you for this suggestion.&lt;/P&gt;&lt;P&gt;As an alternative for gplot, I am going to consider it.&lt;/P&gt;&lt;P&gt;Plotting strictly vertically, though, also imposes certain "spacing requirements".&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 14:56:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725456#M21127</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2021-03-11T14:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725467#M21128</link>
      <description>&lt;P&gt;Thank you very much indeed (once again).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This quasi projects the z-axis to the plane; although I hope I would not have to end there, it brings me closer towards what I am looking for (in particular, I obtain the wanted tilt of the densities now).&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data	in1;
	input	x	t1 t2 t3;
	datalines;
		0.05	0.1	0.05	0.001
		0.1	0.2	0.1	0.001
		0.15	0.2	0.1	0.001
		0.2	0.3	0.4	0.01
		0.25	0.4	0.4	0.02
		0.3	0.5	0.5	0.05
		0.35	1	1	0.1
		0.4	2	2	3
		0.45	2.5	3	4
		0.5	3	4.5	6
		0.55	2.5	3	4
		0.6	2	2	3
		0.65	1	1	0.1
		0.7	0.5	0.5	0.05
		0.75	0.4	0.4	0.02
		0.8	0.3	0.4	0.01
		0.85	0.2	0.1	0.001
		0.9	0.2	0.1	0.001
		0.95	0.1	0.05	0.001
	;
run;
%macro	rearranger1;
	%DO		i	=	1	%TO			3;
	data	_&amp;amp;i.
			;
		set		in1
					(
						keep		=
											x
											t&amp;amp;i.
						rename		=
							(
								t&amp;amp;i.		=		y
							)
							
					)
				;
				s	=	&amp;amp;i.	;
	run;
	%END;
	data	in2
			;
		set	
			_:
			;
	run;
	proc	sql		noprint;
		select
			max(y)	as	maxy
		into
			:maxy
			separated	by	' '
		from
			in2
			;
	quit;	
	data	in3
			;
		set
			in2
			;
		s	=	s	*	ceil(&amp;amp;maxy.);
		y	=	y	+	s;
	run;

%mend	rearranger1;
%rearranger1;
proc	sgplot
	data	=		in3
	noautolegend
	;
	band
		y			=			x
		lower		=			s
		upper		=			y
	/
		group		=			s
	;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="have2.PNG" style="width: 655px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55814i214A2110EA29073E/image-size/large?v=v2&amp;amp;px=999" role="button" title="have2.PNG" alt="have2.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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 15:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725467#M21128</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2021-03-11T15:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725992#M21140</link>
      <description>&lt;P&gt;I expected&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp;to mention his "Joy plot" blog post:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2020/10/26/do-low-mortgage-rates-bring-you-joyplots/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2020/10/26/do-low-mortgage-rates-bring-you-joyplots/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 21:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/725992#M21140</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-03-12T21:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Plot multiple x-y relations with 3D-tilt</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/726275#M21144</link>
      <description>&lt;P&gt;Thank you so much - this is exciting.&lt;/P&gt;&lt;P&gt;If I managed to get this running, I assume, I can give up the "tilt" and plot the densities that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am missing just one step, as I am too dumb to figure out how to plot the densities exactly on the corresponding lines (they are shifted upwards).&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data	in1;
	input	x	t1 t2 t3;
	datalines;
		0.05	0.1	0.05	0.001
		0.1	0.2	0.1	0.001
		0.15	0.2	0.1	0.001
		0.2	0.3	0.4	0.01
		0.25	0.4	0.4	0.02
		0.3	0.5	0.5	0.05
		0.35	1	1	0.1
		0.4	2	2	3
		0.45	2.5	3	4
		0.5	3	4.5	6
		0.55	2.5	3	4
		0.6	2	2	3
		0.65	1	1	0.1
		0.7	0.5	0.5	0.05
		0.75	0.4	0.4	0.02
		0.8	0.3	0.4	0.01
		0.85	0.2	0.1	0.001
		0.9	0.2	0.1	0.001
		0.95	0.1	0.05	0.001
	;
run;
%macro	rearranger1;
	%DO		i	=	1	%TO			3;
	data	_&amp;amp;i.
			;
		set		in1
					(
						keep		=
											x
											t&amp;amp;i.
						rename		=
							(
								t&amp;amp;i.		=		y
							)
							
					)
				;
				s	=	&amp;amp;i.	;
	run;
	%END;
	data	in2
			;
		set	
			_:
			;
	run;
	proc	sql		noprint;
		select
			max(y)	as	maxy
		into
			:maxy
			separated	by	' '
		from
			in2
			;
	quit;	
	data	in3
			;
		set
			in2
			;
		s0	=	s;
		s	=	s	*	ceil(&amp;amp;maxy.);
		y	=	y	+	s;
	run;

%mend	rearranger1;
%rearranger1;



%LET		scaling	=		0.1;	
data	in4;
	set			in3;
		y_with_offset	=	s0	-	(y*&amp;amp;scaling);
run;



proc sgplot
		data				=			in4
		;
		band
			x				=			x
			upper			=			3 
			lower			=			y_with_offset
		/
			group			=			s0
			;
		yaxis
			display			=	
				(
					noline
					noticks
					nolabel
				)
			reverse
			offsetmin		=		.1
 			values			=
				(
					0 to 3 by 1
				)
 			valuesdisplay	=
				(
					'' '1' '2' '3'
				)
			;
	xaxis
			display			=	
				(
					noline
				) 
 			values			=
				(
					0 to 1.0 by .1
				)
			;
run; quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="have3.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55951i960B834A71A81AA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="have3.PNG" alt="have3.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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 13:19:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-multiple-x-y-relations-with-3D-tilt/m-p/726275#M21144</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2021-03-15T13:19:05Z</dc:date>
    </item>
  </channel>
</rss>

