你好,
我編寫了一個腳本,在其中可以將用於採樣深度的滑塊附加到圖形生成器輪廓上。 但是,在使用滑塊時,地圖沒有響應和更改。
我相信所有內容均已正確引用,日誌沒有任何錯誤,但是移動滑塊時沒有任何變化。
腳本已附加。
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變量不在範圍內;代碼可以工作,但實際上,我會將變量放在命名空間中,並在滑動腳本中重建對命名空間的引用。