Créez des cartes thermiques en double avec différentes statistiques récapitulatives dans Graph BuilderÉtant donné la grande classe et cette intrigue :
Graph Builder(
Size( 574, 613 ),
Graph Spacing( 20 ),
Variables(
X( :sex ),
X( :sex ),
Y( :age ),
Color( :height, Summary Statistic( "Min" ) )
),
Elements( Position( 1, 1 ), Heatmap( X, Y, Legend( 4 ) ) ),
Elements( Position( 2, 1 ), Heatmap( X, Y, Legend( 5 ) ) )
)
Existe-t-il un moyen de faire en sorte que le graphique de gauche utilise la statistique récapitulative « Moyenne » et que le graphique de droite utilise « Min » ?
J'ai essayé d'ajouter une autre spécification Color() mais cela ne semble pas fonctionner dans JMP 17.
Exploration et visualisation des donnéesRé: Créer des cartes thermiques en double avec différentes statistiques récapitulatives dans Graph BuilderCe que j'ai fait, c'était de
- Utilisez Tableaux=>Résumé pour créer un nouveau tableau avec les statistiques moyennes et minimales regroupées par sexe et âge
- Utilisez Tables=>Stack pour empiler les colonnes moyennes et minimales
- Exécuter Graph Builder

names default to here(1);
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
// Data table summary
// → Data Table( "Summary of Big Class grouped by age, sex" )
Data Table( "Big Class" ) << Summary(
Group( :age, :sex ),
Mean( :height ),
Min( :height ),
Freq( "None" ),
Weight( "None" ),
statistics column name format( "stat" ),
output table name( "Summary of Big Class grouped by age, sex" )
);
// Stack data table
// → Data Table( "Stack of Summary of Big Class grouped by age, sex (Mean, Min)" )
Data Table( "Summary of Big Class grouped by age, sex" ) <<
Stack(
columns( :Mean, :Min ),
Output Table( "Stack of Summary of Big Class grouped by age, sex (Mean, Min)" )
);
Graph Builder(
X Group Edge( "Bottom" ),
Variables( X( :sex ), Y( :age ), Group X( :Label ), Color( :Data ) ),
Elements( Heatmap( X, Y, Legend( 4 ) ) )
);
Ré: Créer des cartes thermiques en double avec différentes statistiques récapitulatives dans Graph BuilderUne autre option consiste à créer deux rapports de création de graphiques et à les placer côte à côte dans une nouvelle fenêtre de rapport personnalisé. Vous souhaiterez peut-être renommer les graphiques afin qu'il soit clair que l'un d'eux est coloré en Min et Max. Voici un exemple simple :
names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
hm1 = expr( dt << Graph Builder(
Size( 235, 613 ),
Show Control Panel( 0 ),
Variables(
X( :sex ),
Y( :age ),
Color( :height, Summary Statistic( "Min" ) )
),
Elements( Heatmap( X, Y, Legend( 1 ) ) ),
));
hm2 = expr( dt << Graph Builder(
Size( 235, 613 ),
Show Control Panel( 0 ),
Variables(
X( :sex ),
Y( :age ),
Color( :height, Summary Statistic( "Max" ) )
),
Elements( Heatmap( X, Y, Legend( 1 ) ) ),
));
new window( "Two Heat Maps",
h list box( hm1, hm2 )
);
Ré: Créer des cartes thermiques en double avec différentes statistiques récapitulatives dans Graph BuilderAu risque de sur-élaborer cette solution, vous pourriez la généraliser à une liste de statistiques.
names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
statList = { "Mean", "Median", "Mode", "Min", "Max", "Range", "Median", "Std Dev" };
hm_fxn = function( { STAT },
dt << Graph Builder(
Size( 200, 300 ), // Adjust size based on number of heatmaps
Show Control Panel( 0 ),
Variables(
X( :sex ),
Y( :age ),
Color( :height, Summary Statistic( STAT ) )
),
Elements( Heatmap( X, Y, Legend( 1 ) ) ),
SendToReport(
Dispatch( {}, "Graph Builder", OutlineBox,
{Set Title( "Color by " || STAT ), Image Export Display( Normal )}
)
)
)
);
new window( "Heat Maps",
outline box( dt << get name || " Heat Maps",
lub = line up box( n col( 4 ) ) // Adjust n col() for number of heatmaps per row
)
);
for each( { s }, statList,
lub << append( hm_fxn( s ) )
)

Ré: Créer des cartes thermiques en double avec différentes statistiques récapitulatives dans Graph Builder
@BHarris a écrit : J'ai essayé d'ajouter une autre spécification Color() mais cela ne semble pas fonctionner dans JMP 17.
-> ajouter une autre couleur
Fonctionne avec JMP 17 (.2)

dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
Graph Builder(
Size( 574, 613 ),
Summary Statistic( "Median" ),
Graph Spacing( 20 ),
Variables(
X( :sex ),
X( :sex ),
Y( :age ),
Color( :height, Summary Statistic( "N" ) ),
Color( :height, Summary Statistic( "Max" ) )
),
Elements( Position( 1, 1 ), Heatmap( X, Y, Color( 1 ), Legend( 4 ) ) ),
Elements( Position( 2, 1 ), Heatmap( X, Y, Color( 2 ), Legend( 5 ) ) )
);
Ré: Créer des cartes thermiques en double avec différentes statistiques récapitulatives dans Graph BuilderExcellent, ça a marché ! Je pense qu'il me manquait la variable X supplémentaire lorsque j'ai ajouté la spécification de couleur. Ce serait bien si GB prenait cela en charge avec l'interface utilisateur, mais il le fait déjà tellement...
Voici le script final que je recherchais :
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
Size( 934, 824 ),
Show Title( 1 ),
Graph Spacing( 20 ),
Variables(
X( :sex ),
X( :sex ),
X( :sex ),
Y( :age ),
Color( :height, Summary Statistic( "Min" ) ),
Color( :height, Summary Statistic( "Mean" ) ),
Color( :height, Summary Statistic( "Max" ) )
),
Elements(
Position( 1, 1 ),
Heatmap( X, Y, Color( 1 ), Legend( 1 ), Label( "Label by Value" ) )
),
Elements(
Position( 2, 1 ),
Heatmap( X, Y, Color( 2 ), Legend( 2 ), Label( "Label by Value" ) )
),
Elements(
Position( 3, 1 ),
Heatmap( X, Y, Color( 3 ), Legend( 3 ), Label( "Label by Value" ) )
),
SendToReport(
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( "Age vs. Sex, Colored on Height -- Min, Mean, Max" )}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {1, [0], 2, [-1], 3, [-1]} )}
)
)
)