여보세요,
그래프 빌더 윤곽선에 깊이 샘플링을위한 슬라이더를 추가 할 수있는 스크립트를 작성했습니다. 그러나 슬라이더를 사용할 때 맵이 응답하지 않고 변경되지 않습니다.
모든 것이 제대로 참조되고 있으며 로그에 오류가 없다고 생각하지만 슬라이더를 움직여도 아무것도 바뀌지 않습니다.
스크립트가 첨부됩니다.
Names Default to Here(1);
dt = Currentdatatable();
datacolumn=column(dt, "End Depth");
new window ("RFIS Contour Plot Depth Filtering",
window:gb = Graph Builder(
Size( 599, 514 ),
Show Control Panel( 0 ),
Variables(
X( :Longitude ),
Y( :Latitude ),
Color(
Transform Column( "Log[SUM TOC NORM]", Formula( Log( :SUM TOC NORM ) ) )
)
),
Elements(
Contour(
X,
Y,
Legend( 5 ),
Line( 1 ),
Boundary( 0 ),
Number of Levels( 10 ),
Alpha( 95.1827841988282 ),
Smoothness( 0.01 )
),
Points( X, Y, Legend( 6 ) )
),
Local Data Filter(
Add Filter(
columns( :Sample Code, :Area ),
Where( :Area == "AOI" ),
Display(
:Sample Code,
"Single Category Display",
Find( Set Text( "" ) )
)
)
),
SendToReport(
Dispatch(
{},
"Longitude",
ScaleBox,
{Scale( "Geodesic" ), Format( "Best", 15 ), Min( -122.777380897341 ),
Max( -122.674219621177 ), Inc( 0.025 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"Latitude",
ScaleBox,
{Scale( "Geodesic" ), Format( "Fixed Dec", 15, 2 ),
Min( 45.5156964729219 ), Max( 45.6018236979199 ), Inc( 0.05 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
5,
Properties(
0,
{gradient(
{Color Theme(
{"Green Yellow Red Copy", 16387, {"Green", "Yellow",
{252, 11, 11}}, {0.273504273504274, 0.5,
0.789173789173789}}
), Width( 12 )}
)},
Item ID( "Log[SUM TOC NORM]", 1 )
)
), Legend Model(
6,
Properties(
0,
{gradient(
{Color Theme(
{"Green Yellow Red Copy", 16387, {"Green", "Yellow",
{252, 11, 11}}, {0.273504273504274, 0.5,
0.789173789173789}}
), Width( 12 ), N Labels( 10 )}
)},
Item ID( "Log[SUM TOC NORM]", 1 )
),
Properties( 1, {Marker Size( 4 )}, Item ID( "Latitude", 1 ) )
)}
),
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( "RFIS Contour Plot Depth Filtering" )}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Background Map(
Images(
"Web Map Service",
"http://wms2.mapsavvy.com/WMSService.svc/f8e454cf75bf41a882e5126809b56a45/WMSLatLon",
"Aerial"
)
), Grid Line Order( 2 ), Reference Line Order( 3 )}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {5, [0], 6, [-1, -1]} ), Position( {0, -1, -1} )}
)
),
),
H List Box(
Text Box("Depth"),
window:slmin = col min(datacolumn);
window:slmax = col max(data column);
window:slider1 = SliderBox(window:slmin, window:slmax, window:slmax,
scale=Matrix( {slmin,slmax} );
scale=scale`;
window:gb <<SENDTOREPORT></SENDTOREPORT>감사
다음은 슬라이더를 사용하여 로컬 데이터 필터의 하한을 조작하는 코드입니다 (값을 변경할 수 있는지 여부를 모르기 때문에 삭제하고 다시 생성하지만 최소한 데이터 양이 적은 경우에는 매끄럽게 보입니다).
names default to here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
minval = min(:height<<GETVALUES>= 51 & :height <= 70 ) ),
Close Outline(1)
);
// add a slider to control the minimum value of the data filter
vlb << append(
SliderBox(minval,maxval,::var,
df << delete(:height);
df <<ADDFILTER>= ::var ) )
)
)</ADDFILTER></GETVALUES>
필터의 하한과 상한을 모두 제어하려면 RangeSliderBox를 사용할 수 있습니다.
(ps : 이것은 약간 엉성한 코드입니다. 슬라이더 상자가 df 변수가 더 이상 범위에 없습니다. 코드는 작동하지만 실제로는 변수를 네임 스페이스에 넣고 슬라이더 스크립트에서 네임 스페이스에 대한 참조를 재구성합니다.