Hallo,
Wie passe ich die Hintergrundfarbe in Graph Builder so an, dass 4 verschiedene Quadranten angezeigt werden (dh Quadrant 1 hat eine andere Farbe als Quadrant 2, eine andere Farbe als Quadrant 3 usw.)?
Vielen Dank!!

Mit JMP können grafische Grundelemente zu allen grafischen Ausgaben im System hinzugefügt werden.So erstellen Sie die folgende Grafik

Klicken Sie einfach mit der rechten Maustaste auf das native Diagramm und wählen Sie "Anpassen".Es öffnet sich ein Fenster, in dem Sie dem Diagramm ein Skript hinzufügen können.

Sie können dann das geänderte Diagramm übernehmen und ein Diagramm speichern, das wie folgt aussieht:
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 );
)}
)}
)
)
);
Es gibt jedoch eine einfachere Form, die die meisten Programmierer für bequemer halten
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 );
);