你好
我的報告窗口中有很多由圖形生成器創建的圖形。 我希望有一個包含圖形內容的窗口,當我單擊它們時,它可以向我顯示已標識的圖形。
我找不到任何類似的問題的解決方案。 如果有人可以幫助我,我將不勝感激。
謝謝
這裡有幾種方法可以做到這一點:
還存在其他方法
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
nw = New Window( "Graphs",
V List Box(
ob1 = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
);
ob1rpt = Report( ob1 );
ob1rpt[Outline Box( 1 )] << set title( "Graph 1" );
ob1rpt << close;
ob2 = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( Y( :weight ), X( :sex ) ),
Elements( Points( X, Y, Legend( 6 ) ) )
);
ob2rpt = Report( ob2 );
ob2rpt[Outline Box( 1 )] << set title( "Graph " );
ob2rpt << close;
)
);
nw2 = New Window( "Graphs",
V List Box(
Button Box( "Graph 1",
Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
)
),
Button Box( "Graph 2",
Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( Y( :weight ), X( :sex ) ),
Elements( Points( X, Y, Legend( 6 ) ) )
)
)
)
);這是另一種方法,它將為您提供可接受的解決方案
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
nw2 = New Window( "Graphs",
hlb = H List Box(
V List Box(
Button Box( "Graph 1",
Try( Report( gb ) << delete );
hlb << append(
gb = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) )
)
);
),
Button Box( "Graph 2",
Try( Report( gb ) << delete );
hlb << append(
gb = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( Y( :weight ), X( :sex ) ),
Elements( Points( X, Y, Legend( 6 ) ) )
)
);
)
)
)
);