cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-782918%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EErstellen%20eines%20Paneldiagramms%20mit%20pivotierten%20Daten%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-782918%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHallo%20JMP-Community%2C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EIch%20verwende%20JMP%2017.0.0%20und%20wei%C3%9F%2C%20dass%20ich%20mithilfe%20des%20Felds%20%E2%80%9EUmbrechen%E2%80%9C%20im%20Graph%20Builder%20ein%20Paneldiagramm%20f%C3%BCr%20einen%20nicht%20pivotierten%20Datensatz%20erstellen%20kann.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EWie%20erstelle%20ich%20jedoch%20ein%20Paneldiagramm%20f%C3%BCr%20einen%20Datensatz%2C%20der%20bereits%20pivotiert%20wurde%3F%20Das%20Beste%2C%20was%20mir%20einf%C3%A4llt%2C%20ist%2C%20einzelne%20Spalten%20auf%20die%20Y-Achse%20des%20Graph%20Builders%20zu%20ziehen%2C%20um%20die%20Diagramme%20einzeln%20zu%20stapeln%2C%20aber%20nicht%20in%20einem%20Panelformat.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EW%C3%BCrde%20mich%20freuen%2C%20die%20Meinung%20aller%20dazu%20zu%20h%C3%B6ren.%20Danke!%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JZ_0-1724172598393.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22JZ_0-1724172598393.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22JZ_0-1724172598393.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22JZ_0-1724172598393.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F67333iC9847B0E6EC8826B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JZ_0-1724172598393.png%22%20alt%3D%22JZ_0-1724172598393.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-782918%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EDatenexploration%20und%20-visualisierung%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-782939%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20Erstellen%20eines%20Paneldiagramms%20mit%20pivotierten%20Daten%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-782939%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMit%20JMP%20m%C3%BCssen%20Sie%20m%C3%B6glicherweise%20Tabellen%20in%20beiden%20Formaten%20(breit%2Fgeteilt%20oder%20hoch%2Fgestapelt)%20verwenden%2C%20also%20stapeln%20Sie%20Ihre%20Daten%20und%20erstellen%20Sie%20das%20Diagramm%20(es%20sei%20denn%2C%20Sie%20m%C3%B6chten%20sie%20wie%20Sie%20es%20getan%20haben%20als%20separate%20Spalten%20zur%20Y-Achse%20hinzuf%C3%BCgen).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-782975%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBetreff%3A%20Erstellen%20eines%20Paneldiagramms%20mit%20pivotierten%20Daten%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-782975%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E-%20Graph%20Builder%20kann%20das%20Pivotieren%20h%C3%A4ufig%20selbst%20durchf%C3%BChren%2C%20es%20ist%20nicht%20n%C3%B6tig%2C%20dies%20manuell%20zu%20tun.%3C%2FP%3E%3CP%3E%E2%80%93%20wie%20Jarmo%20vorgeschlagen%20hat%2C%20%E2%80%9Estapeln%E2%80%9C%20Sie%20die%20Werte%20und%20verwenden%20Sie%20%E2%80%9ELabel%E2%80%9C%2C%20um%20die%20Diagramme%20zu%20umschlie%C3%9Fen.%3C%2FP%3E%3CP%3E-%20Wenn%20Sie%20unterschiedliche%20Achsenskalen%20f%C3%BCr%20die%20einzelnen%20Diagramme%20ben%C3%B6tigen%2C%20funktioniert%20%E2%80%9EUmbrechen%E2%80%9C%20nicht.%3CBR%20%2F%3E%20-%26gt%3B%20Upgrade%20auf%20JMP18%20und%20Verwendung%20von%20%E2%80%9EPage%E2%80%9C%20statt%20%E2%80%9EWrap%E2%80%9C%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1724183095637.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1724183095637.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F67342i7772971A9DDA14BD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1724183095637.png%22%20alt%3D%22hogi_0-1724183095637.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FWater%20Treatment.jmp%22%20)%3B%0A%0Adtstacked%20%3D%20dt%20%20%26lt%3B%26lt%3B%20Stack(%0A%09columns(%0A%09%09%3A%22Q-E%22n%2C%20%3A%22ZN-E%22n%2C%20%3A%22PH-E%22n%2C%20%3A%22DBO-E%22n%2C%20%3A%22DQO-E%22n%2C%20%3A%22SS-E%22n%2C%20%3A%22SSV-E%22n%2C%0A%09%09%3A%22SED-E%22n%2C%20%3A%22COND-E%22n%0A%09)%2C%0A%09%22Non-stacked%20columns%22n(%20Keep(%20%3ADate%20)%20)%0A)%3B%0A%0Adtstacked%20%20%26lt%3B%26lt%3B%20Graph%20Builder(%0A%09Transform%20Column(%0A%09%09%22Month%5BDate%5D%22%2C%0A%09%09Format(%20%22Format%20Pattern%22%2C%20%22%3CMM%3E%3CYYYY%3E%22%2C%2015%20)%2C%0A%09%09Formula(%20Date%20Increment(%20%3ADate%2C%20%22Month%22%2C%200%20)%20)%0A%09)%2C%0A%09Link%20Page%20Axes(%20%22X%20Only%22%20)%2C%0A%09Replicate%20Linked%20Page%20Axes(%200%20)%2C%0A%09Variables(%0A%09%09X(%20%3A%22Month%5BDate%5D%22n%20)%2C%0A%09%09Y(%20%3AData%20)%2C%0A%09%09Page(%20%3ALabel%2C%20Levels%20per%20Row(%203%20)%2C%20Show%20Title(%200%20)%20)%0A%09)%2C%0A%09Elements(%0A%09%09Points(%20X%2C%20Y%2C%20Summary%20Statistic(%20%22Mean%22%20)%20)%2C%0A%09%09Smoother(%20X%2C%20Y%20)%0A%09)%0A)%3B%3C%2FYYYY%3E%3C%2FMM%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
JZ
JZ
Level I

Creating Panel Plot using pivoted data

Hi JMP Community,

 

I'm using JMP 17.0.0 and I understand that I can use the "Wrap" box in Graph Builder to create a panel plot for an unpivoted dataset. 

 

However, how do I create a panel plot for a dataset that has already been pivoted? The closest I can come up with is to drag individual columns to the y-axis of graph builder to stack the plots one by one, but not in a panel format. 

 

Would love to hear everyone's input on this. Thanks!

 

JZ_0-1724172598393.png

 

2 REPLIES 2
jthi
Super User

Re: Creating Panel Plot using pivoted data

With JMP you might have to utilize table in both formats (wide/split or tall/stack) so stack your data and create the plot (unless you want to add them as separate columns to y-axis like you have done).

-Jarmo
hogi
Level XIII

Re: Creating Panel Plot using pivoted data

- Often Graph Builder can do the pivoting, no need to do it manually.

- as Jarmo suggested, "stack" the values and use "Label" to wrap the plots.

- if you need different axis scales for the individual plots, "Wrap" will not work.
-> Upgrade to JMP18 and use "Page" instead of "Wrap"

hogi_0-1724183095637.png

 

dt = Open( "$SAMPLE_DATA/Water Treatment.jmp" );

dtstacked = dt  << Stack(
	columns(
		:"Q-E"n, :"ZN-E"n, :"PH-E"n, :"DBO-E"n, :"DQO-E"n, :"SS-E"n, :"SSV-E"n,
		:"SED-E"n, :"COND-E"n
	),
	"Non-stacked columns"n( Keep( :Date ) )
);

dtstacked  << Graph Builder(
	Transform Column(
		"Month[Date]",
		Format( "Format Pattern", "<MM></><YYYY>", 15 ),
		Formula( Date Increment( :Date, "Month", 0 ) )
	),
	Link Page Axes( "X Only" ),
	Replicate Linked Page Axes( 0 ),
	Variables(
		X( :"Month[Date]"n ),
		Y( :Data ),
		Page( :Label, Levels per Row( 3 ), Show Title( 0 ) )
	),
	Elements(
		Points( X, Y, Summary Statistic( "Mean" ) ),
		Smoother( X, Y )
	)
);

 

Recommended Articles