해결책
컨텍스트는 모든 것입니다! 텍스트 블록에 작은 꺾은 선형 차트를 포함하려는 것처럼 스파크 라인 토론의 맥락에서 그들을 보여주기 위해, 누군가는 그들의 위치의 맥락에서 변수를 비교하기 위해지도에 작은 막 대형 차트를 삽입하고자 할 수 있습니다. 우리 자신을 좋아하는 사람 @scwise , 누가이 제안을 희망 목록 항목 .
이 솔루션은 가상 조인과 표 셀에서 이미지를 마커로 사용할 수있는 두 가지 최신 JMP 기능을 사용하여 구현할 수 있습니다. 그래프 빌더가 합성 그래프의 그래프 요소를 사용하여 데이터 테이블을 생성하는 기능과 결합하여이 퍼즐을 해결하는 데 필요한 모든 요소를 갖추고 있습니다. 최종 결과는 다음과 같습니다.
US Elections 2008: Obama vs McCain2008 년 미국 대선 : 오바마 대 매케인
아래 세부 사항 :
dt1 = Open("$SAMPLE_DATA/US Election 2008.jmp");
// Create per state graphs
gb1 = Graph Builder(
Variables( Y( :Obama ), Y( :McCain, Position( 1 ) ), Page( :State ) ),
Elements( Bar( Y( 1 ), Y( 2 ), Legend( 8 ), Summary Statistic( "Max" ) ) ),
SendToReport(
Dispatch(
{},
"",
ScaleBox( 2 ),
{Min( -0.657608695652174 ), Max( 0.657608695652174 ), Inc( 0.25 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"",
ScaleBox( 3 ),
{Min( -0.657608695652174 ), Max( 0.657608695652174 ), Inc( 0.25 ),
Minor Ticks( 0 )}
),
Dispatch( {}, "400", LegendBox, {Set Title( "" )} )
)
);
// Save graphs as images to data table
dt2 = gb1 << Make into Data Table;
// Tip: save table to enable virtual join
dt2 << Save("$TEMP/ElectionPerStateGraph.jmp");
// Set virtual join between tables
dt2:State << Set Property("Link ID", 1);
dt1:State << Set Property(
"Link Reference",
Reference Table( "$TEMP/ElectionPerStateGraph.jmp" ));
// Use virtually joined graph column as source for markers
col = Column(dt1, "Graph[State]");
col << UseForMarker( 1 );
// Create map with a points overlay using graph markers
dt1 << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( Shape( :State ) ),
Elements( Map Shapes( Legend( 2 ) ), Points( Legend( 3 ) ) )
);