Sezione trasversale di un grafico 2DCome posso tracciare la variazione in un grafico 2D lungo, ad esempio, verticalmente in un grafico a linee 1D in JMP?
Vengo da Matlab (un equivalente in MATLAB è qualcosa del tipo Questo )
Grazie,
Modellazione statistica avanzataAutomazione e scriptingRicerche sui consumatori e sul mercatoAccesso ai datiRe: Sezione trasversale di un grafico 2DUna soluzione è ora disponibile tramite Barra degli strumenti del generatore di grafici

Re: Sezione trasversale di un grafico 2DAh!@ih prima di me. Ho iniziato un esempio simile ma poi sono rimasto in riunione per tre ore.
Names Default to Here( 1 );
dt = New Table( "Slicing",
Add Rows( 2 ),
New Column( "X",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [-1, 1] )
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [-1, 1] )
),
New Column( "Z",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula(
100 + 25 * :X - 3 * :X ^ 2 - 15 * :Y - 5 * :Y ^ 2 - 7 * :X * :Y
)
)
);
dt << Surface Plot(
Columns( :Z ),
Surface Color Theme( "Green to Black to Red" ),
Surface Color Theme2( "Green to White to Red" ),
Surface Color Theme3( "White to Black" ),
Surface Color Theme4( "Blue to Gray to Red" ),
Response Column Color Theme( "Blue to Green to Red" ),
Response Column Color Theme2( "Spectral" ),
Response Column Color Theme3( "Jet" ),
Response Column Color Theme4( "White to Blue" ),
Formula( "Z" ),
Surface Color Method( "Solid", "Solid", "Solid", "Solid" ),
SetVariableAxis( :X, Axis Data( {} ) ),
SetVariableAxis( :Y, Axis Data( {} ) ),
SetZAxis( :Z, Current Value( 95 ), Axis Data( {} ) ),
SetXVariable( :X ),
SetYVariable( :Y ),
Iso Value( 0, 75 ),
Frame3D( Set Rotation( -54, 0, 38 ) )
);
dt << Profiler(
Y( :Z ),
Profiler(
1,
Term Value( X( 0, Lock( 0 ), Show( 1 ) ), Y( 0, Lock( 0 ), Show( 1 ) ) )
),
SendToReport(
Dispatch(
{"Prediction Profiler"},
"10000",
ScaleBox,
{Min( 72.5 ), Max( 125.754437869822 ), Inc( 10 ), Minor Ticks( 0 )}
)
)
);Re: Sezione trasversale di un grafico 2DPuoi pubblicare alcuni dati di esempio e lo script che hai finora?
Re: Sezione trasversale di un grafico 2DInoltre, il grafico dei contorni (non quello del costruttore di grafici, utilizza la piattaforma dei contorni) può salvare dati su griglia. Finché desideri sezioni verticali o orizzontali, dovrebbe essere una riga o una colonna dai dati grigliati.
dt = Open( "$sample_data/big class.jmp" );
// step 1: use the contour plot to get a grid of the data
cp = dt << Contour Plot(
X( :height, :weight ),
Y( :age ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Specify Contours( Min( 13 ), Max( 16.5 ), N( 8 ) )
);
nres = 100; // make this bigger if you think there is meaningful data there
dtGrid = cp << generate grid( nres, nres );
cp<<CLOSEWINDOW></CLOSEWINDOW>
// step 2: make the cross section
dtGrid:height<<SETMODELINGTYPE></SETMODELINGTYPE>
Drive the height selector with up and down arrows.Drive the height selector with up and down arrows.Guidare il selettore dell'altezza con le frecce su e giù.
modifica: i dati grigliati vengono estrapolati oltre l'inviluppo dei punti dati. Le estremità della sezione trasversale probabilmente rientrano nell'intervallo estrapolato. Probabilmente vorrai abbinare il grafico del contorno (chiuso, sopra, magari tenerlo aperto) ad altezza=61,5 (ecc.) per vedere quale sarebbe l'intervallo valido per il peso. Anche in questo caso, il tracciato del contorno esegue un'interpolazione lineare tra i triangoli formati dai punti dati. Big Class non è particolarmente fluido o denso, quindi si vedono molti strani artefatti che generano un falso senso di dettaglio, anche all'interno dell'involucro dei punti dati.
Re: Sezione trasversale di un grafico 2DGrazie. Il mio grafico 2D è basato su Xdata, Ydata e Data.
Ciò che mostri con il filtro dati sembra promettente, ma non riesco a riuscire a tracciare una sezione su un valore Xdata (per tutti i valori Ydata).
Continuerò a guardare da questa parte, ma qualsiasi indicazione sarà molto utile.
(Sono su JMP13)
Re: Sezione trasversale di un grafico 2DNon sono sicuro che il tuo grafico 2D sia basato su punti o su una formula. Se punti, potresti utilizzare il generatore di grafici per tracciare il valore target rispetto a una dimensione nel grafico con un filtro dati per definire la "sezione" nell'altra dimensione.

Se stai esplorando una formula di colonna, allora sono d'accordo con @Mark_Bailey che il profiler è l'approccio più semplice. Basta cambiare il valore di un valore e vedere la trama dell'altro.

Di seguito sono riportati gli script per entrambi:
Names default to here(1);
dt = Open("$Sample_data/iris.jmp");
New Column("H1_1", Numeric, "Continuous", Format("Best", 12), Set Property("Notes", "Model NTanH(3)"), Formula(TanH(0.5 * ((-3.50407799736543) + -1.69201212624413 * :Sepal length + 4.45798369366822 * :Sepal width))), Set Property("Intermediate", 1));
New Column("H1_2", Numeric, "Continuous", Format("Best", 12), Set Property("Notes", "Model NTanH(3)"), Formula(TanH(0.5 * ((-4.34695576142641) + 0.578814453314083 * :Sepal length + -0.387699136913814 * :Sepal width))), Set Property("Intermediate", 1));
New Column("H1_3", Numeric, "Continuous", Format("Best", 12), Set Property("Notes", "Model NTanH(3)"), Formula(TanH(0.5 * ((-14.9199578715582) + 8.0363609653296 * :Sepal length + -9.32672254743267 * :Sepal width))), Set Property("Intermediate", 1));
New Column("Predicted Petal length", Numeric, "Continuous", Format("Best", 12), Set Property("Notes", "Model NTanH(3)"), Formula(9.72824082889675 + 0.825393378043811 * :H1_1 + 8.38378988028562 * :H1_2 + 1.62929374850912 * :H1_3), Set Property("Predicting", {:Petal length, Creator("Neural")}));
New Window("Plotting points",
H List Box(
Graph Builder(
Size( 522, 456 ),
Show Control Panel( 0 ),
Variables( X( :Sepal length ), Y( :Petal length ) ),
Elements( Points( X, Y, Legend( 295 ) ), Line( X, Y, Legend( 297 ) ) ),
Local Data Filter(
Add Filter(
columns( :Sepal width ),
Where( :Sepal width >= 2.9 & :Sepal width <= 3.1 )
)
)
),
Contour Plot(
X( :Sepal width, :Sepal length ),
Y( :Petal length ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Specify Contours( Min( 2 ), Max( 6 ), N( 5 ) ),
SendToReport(
Dispatch(
{},
"1",
ScaleBox,
{Add Ref Line(
{2.9, 3.1},
"Solid",
"Medium Dark Magenta",
"Slice",
1,
0.25
)}
)
)
)
)
);
//Profiler
Profiler(
Y( :Predicted Petal length ),
Profiler(
1,
Term Value(
Sepal length( 6.302, Lock( 0 ), Show( 1 ) ),
Sepal width( 3.125, Lock( 0 ), Show( 1 ) )
)
),
Expand,
SendToReport(
Dispatch(
{"Prediction Profiler"},
"Profiler",
FrameBox,
{Frame Size( 320, 260 )}
),
Dispatch(
{"Prediction Profiler"},
"Profiler",
FrameBox( 3 ),
{Frame Size( 320, 260 )}
)
)
);
Aggiornato: aggiunte formule di colonna per la colonna di previsione allo script.
Re: Sezione trasversale di un grafico 2DGrazie, l'opzione profiler sembra utile, ma ci sono molte opzioni. Lo esaminerò.
Quello che stavo cercando è un approccio basato su script.
Per un grafico 2D, come ottenere una fetta x (per un dato valore y) o una fetta y (per un dato valore x). Questo è tutto ciò che voglio fare in questo momento.Re: Sezione trasversale di un grafico 2DConsultare il libro nella Guida di JMP relativo a Profilatori .