On a related note, we can insert a code snippet with Insert>>Syntax Highlighting in the advance editor. Will this code by auto-translated? In addition, why isn't there a JSL option?
dt = Open( "$SAMPLE_DATA/Hurricanes.jmp" );;
// this produces the contures in linear scale
plot1 = dt << Bivariate( Y( :Latitude ), X( :Longitude ), Nonpar Density );
// extract the density to the data table
plot1 << (Curve[1] << Save Density Quantile);
plot1 << (Curve[1] << color by density Quantile);
// transform the density as you wish in a new column
dt << new column ("Ln Density", formula (ln(:Density)));
// plot the transformed density
dt << Contour Plot(
X( :Latitude, :Longitude ),
Y( :Ln Density ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "None" ),
Specify Contours(
Min( -7 ),
Max( -1 ),
N( 7 ),
Contour( 1, -7, -5793511 ),
Contour( 2, -6, -8423637 ),
Contour( 3, -5, -10725064 ),
Contour( 4, -4, -12632256 ),
Contour( 5, -3, -12885662 ),
Contour( 6, -2, -13595764 ),
Contour( 7, -1, -14828355 )
),
SendToReport(
Dispatch( {}, "Contour Legend", FrameBox, {Frame Size( 102, 235 )} )
)
);
// another plotting option - a mix of linear coloring and the log scale.
Scatterplot 3D(
Y( :Latitude, :Longitude, :Ln Density ),
Frame3D(
Set Grab Handles( 0 ),
Set Rotation( -56.0113386746381, -13.7470705335584, 1.38294617183857 )
)
);