Salut,
Comment puis-je personnaliser la couleur d'arrière-plan dans Graph Builder pour afficher 4 quadrants différents (c'est-à-dire que le quadrant 1 est d'une couleur différente du quadrant 2 qui est une couleur différente de celle du quadrant 3, etc.) ?
Merci!!

JMP permet d'ajouter des primitives graphiques à n'importe laquelle des sorties graphiques du système. Donc pour produire le graphique ci-dessous

Il vous suffit de faire un clic droit sur le graphique natif et de sélectionner "Personnaliser". Il ouvre une fenêtre qui vous permet d'ajouter un script au graphique.

Vous pouvez ensuite prendre le graphique modifié et faire un Save Graph qui ressemblera à :
Names Default To Here( 1 );
dt = open("$SAMPLE_DATA/big class.jmp");
Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"weight",
ScaleBox,
{Add Ref Line( 110, "Solid", "Black", "", 1 )}
),
Dispatch(
{},
"height",
ScaleBox,
{Add Ref Line( 60, "Solid", "Black", "", 1 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Add Graphics Script(
2,
Description( "" ),
Transparency( 0.5 );
Fill Color( {1, 1, .5} );
left = Current Report()[axisbox( 1 )] << getmin;
top = Current Report()[axisbox( 2 )] << getmax;
right = Current Report()[axisbox( 1 )] << getmax;
bottom = Current Report()[axisbox( 2 )] << getmin;
Fill Color( {1, 1, .5} );
Rect( left, top, 110, 60, fill = 1 );
Fill Color( "red" );
Rect( 110, top, right, 60, fill = 1 );
Fill Color( "green" );
Rect( left, 60, 110, bottom, fill = 1 );
Fill Color( "orange" );
Rect( 110, 60, right, bottom, fill = 1 );
), Grid Line Order( 1 ), Reference Line Order( 3 ),
DispatchSeg(
TopSeg( 1 ),
{Set Script(
Transparency( 0.5 );
Fill Color( {1, 1, .5} );
left = Current Report()[axisbox( 1 )] << getmin;
top = Current Report()[axisbox( 2 )] << getmax;
right = Current Report()[axisbox( 1 )] << getmax;
bottom = Current Report()[axisbox( 2 )] << getmin;
Fill Color( {1, 1, .5} );
Rect( left, top, 110, 60, fill = 1 );
Fill Color( "red" );
Rect( 110, top, right, 60, fill = 1 );
Fill Color( "green" );
Rect( left, 60, 110, bottom, fill = 1 );
Fill Color( "orange" );
Rect( 110, 60, right, bottom, fill = 1 );
)}
)}
)
)
);
Cependant, il existe une forme plus simple que la plupart des programmeurs trouvent plus pratique.
Names Default To Here( 1 );
dt = open("$SAMPLE_DATA/big class.jmp");
gb = dt << Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 5 ) ) )
);
report(gb)[FrameBox(1)] << add graphics script(
Transparency( 0.5 );
Fill Color( {1, 1, .5} );
left = Current Report()[axisbox( 1 )] << getmin;
top = Current Report()[axisbox( 2 )] << getmax;
right = Current Report()[axisbox( 1 )] << getmax;
bottom = Current Report()[axisbox( 2 )] << getmin;
Fill Color( {1, 1, .5} );
Rect( left, top, 110, 60, fill = 1 );
Fill Color( "red" );
Rect( 110, top, right, 60, fill = 1 );
Fill Color( "green" );
Rect( left, 60, 110, bottom, fill = 1 );
Fill Color( "orange" );
Rect( 110, 60, right, bottom, fill = 1 );
);Bonjour,
Intéressant de pouvoir marquer certaines parties du graphique avec une couleur.
Y a-t-il une chance que vous puissiez faire cela sans script ??
Je ne l'ai fait qu'en partie en utilisant des lignes de référence avec chevauchement (ce que je voudrais éviter) - voir la capture d'écran ci-jointe.
Passe une bonne journée.
Il existe plusieurs façons d’ajouter des éléments à vos graphiques.
Annotations
La barre d'outils au-dessus de la fenêtre d'affichage JMP contient des icônes qui permettent d'ajouter des éléments d'annotation aux graphiques.

Du texte, des flèches et des lignes, des polygones et des cercles peuvent être ajoutés. Ils sont ajoutés au-dessus de l'affichage graphique.
Vous pouvez également faire un clic droit sur le graphique et choisir « Personnaliser » qui permet d'ajouter des éléments à l'aide de primitives graphiques. Bien que ceux-ci utilisent JSL, ils sont très simples à utiliser et vous permettent d'ajouter des zones colorées, du texte, des lignes, etc. et ils peuvent être positionnés à n'importe quel niveau de l'affichage.