이변량 플롯에 좌표 평균을 추가하는 방법, 즉 중심점 플로팅두 가지 유형의 행을 가진 일련의 좌표가 있습니다. 데이터는 Column1(x 좌표), Column2(y 좌표), 그리고 Type의 세 열로 구성됩니다.
이변량 분석에서 두 좌표 그룹을 표시하고 타원을 그린 후, 각 그룹의 중심에 각 좌표 그룹의 중심을 나타내는 마커를 추가하고 싶습니다. 마커는 "유형" 열에서 지정한 색상과 일치하는 것이 좋습니다.
플롯 아래 통계에서 필요한 값을 확인할 수 있습니다. 각 그룹의 1열 평균과 2열 평균인데, 색상 마커를 사용하여 플롯에 추가하는 방법을 모르겠습니다. 아래 이미지에서는 텍스트로 "+" 기호 두 개를 직접 추가했지만, 여러 그룹을 여러 번 반복해서 사용해야 할 때는 번거롭습니다.

데이터 블렌딩 및 정리대량 맞춤화Re: 이변량 플롯에 좌표 평균을 추가하는 방법, 즉 중심점 플로팅아마 이런 것일 수도 있겠다
Seemed easier to find the markers on a black background.검은색 배경에서 마커를 찾는 것이 더 쉬웠습니다.
// this is an imperfect solution; the added marker color and position is static and
// will not respond to changes. It also depends on the organization of the displayboxes
// in the report.
oldpref = getpreference(Continuous Color Theme( )); // remember the old color pref
setpreference(Continuous Color Theme( "Spectral" )); // set a more obvious color change
bc=open("$sample_data/big class.jmp");
// make a graph with density ellipses for each age
bv = bc<
<BIVARIATE>
="15", elname = elOutline << gettitle; // "Bivariate Normal Ellipse P=0.950 age==17" // that same ellipse name appears above, with a color swatch. get the color. query = Eval Insert( "//TextEditBox[text()[contains(.,'^elname^')]]" ); // the query is the label to the right of a popup and the color. // .. moves up to the parent; the CustomBox child holds the color customBoxColor = bv << xpath( query || "/../CustomBox" ); // extracting the color from the popupbox legend: write to svg (customboxcolor) << savepicture( "$temp/color.svg", "svg" ); // read the svg text svgblob = Load Text File( "$temp/color.svg", blob() ); // parse the svg text to a data table, just grab the color dt = Open( svgblob, invisible, // I uses the XML wizard to generate this code. XML Settings( Stack( 0 ), Row( "/svg/g/g/g" ), // SVG *is* XML Col( "/svg/g/g/g/@stroke", Column Name( "color" ), Fill( "Use Once" ), Type( "Character" ), Format( {"Best"} ), Modeling Type( "Continuous" ) ) ), XML Wizard( 0 ) ); // the data table's color column (and only row) is the color elColor = Substr( dt:color[1], 2 ); // "#8E95D5", drop the # close(dt,nosave); // don't leave the invisible table open // convert the hex to a JSL color elColor = rgbcolor(Hex To Number( Substr( elColor, 1, 2 ) ),Hex To Number( Substr( elColor, 3, 2 ) ),Hex To Number( Substr( elColor, 5, 2 ) )); , // else JMP 14 has no XML elColor = rgbcolor(1,1,1); // white, opposite of background color, black ); // next, get the coordinates of the mean // minimal validation we are looking at the right column... if( elOutline[NumberColBox(1)]<
<GETHEADING></GETHEADING>
</BIVARIATE>
Links:
xpath: <A href="https://community.jmp.com/t5/Discovery-Summit-2015/JMP-Discovery-2015-Mining-JMP-Reports-v10-pdf/m-p/22595#U22595" class="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa" target="_blank">JMP Discovery 2015 - JMP 보고서 마이닝 - v10.pdf</A> and <A href="https://community.jmp.com/t5/Discussions/xPath-coding-help/m-p/326500/highlight/true#M57581" target="_blank">이거</A>
ellipse: <A href="https://community.jmp.com/t5/Uncharted/Ellipse/m-p/21242#U21242" class="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa" target="_blank">타원</A>
XML: <A href="https://community.jmp.com/t5/Uncharted/Open-an-RSS-Feed-in-JMP/m-p/239296#U239296" class="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa" target="_blank">JMP에서 RSS 피드 열기</A> , <A href="https://community.jmp.com/t5/Uncharted/Contour-Plot-Areas/m-p/294516#U294516" class="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa" target="_blank">등고선 플롯 영역</A> , <A href="https://community.jmp.com/t5/Uncharted/Currency-Exchange-Rates/m-p/240876#U240876" class="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa" target="_blank">환율</A> , <A href="https://community.jmp.com/t5/Uncharted/SQL-for-Cord-Cutters/m-p/238656#U238656" class="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa" target="_blank">코드 커터를 위한 SQL</A>
<BR />
Re: 이변량 플롯에 좌표 평균을 추가하는 방법, 즉 중심점 플로팅제 생각에는 다음과 같습니다.
Marker Size( 6 );
Marker(
1,
{Col Mean( :Column 1, :Type == "Type1" ),
Col Mean( :Column 2, :Type == "Type1" )}
);
Marker(
1,
{Col Mean( :Column 1, :Type == "Type2" ),
Col Mean( :Column 2, :Type == "Type2" )}
);
하지만 그 해결책은 여전히 그룹당 하나의 마커를 추가하는 것을 요구합니다.
"유형" 열에 포함된 모든 그룹에 대한 마커를 모두 추가할 수 있는 방법이 있나요?
분석에 사용된 동일한 색상 테마를 계속 사용하려면 어떻게 해야 하나요?
Re: 이변량 플롯에 좌표 평균을 추가하는 방법, 즉 중심점 플로팅하지만 이건 제 필요에 대한 간단한 예시일 뿐입니다. 보통 시각화에 추가해야 할 중심점이 수십 개씩 생깁니다. 실제 분석에서는 중심점을 표시해야 할 범주가 너무 많아서 너무 빨리 힘들어집니다.
아마도 테이블에 행을 수동으로 추가하지 않고도 이러한 좌표를 추가할 수 있는 방법이 있을 것입니다.
수동 플로팅을 피하면서 유형 분석을 통해 계산된 평균값을 그래프로 나타낼 수 있는 방법이 있습니까?
아니면 Graph Builder에서도 행(마커)을 수동으로 추가하는 일이 없다면 별 문제가 없을 수도 있습니다.
Re: 이변량 플롯에 좌표 평균을 추가하는 방법, 즉 중심점 플로팅데이터 표에 중심점의 좌표와 유형을 두 개의 새 행으로 추가하세요. 행 상태를 '제외됨', 빨간색 또는 파란색으로 변경하고, "+" 표시를 하세요.