cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
ChesterKnurek
Level II

Contour map creation in JSL brings up MIN/MAX/#LAYERS diaglog for each graph

directory = "C:\TEST\";

fileNames = Files In Directory( directory );

For( iFile = 1, iFile <= N Items( fileNames ), iFile++,

  filename = fileNames[iFile];

  If( Ends With( filename, ".csv" ),

    dt = Open( directory || filename );
	max = Col Max(Column( dt,4));
	min = Col Min(Column( dt,4));
	dt:DC_0VDC << Format( "Engineering", 12 );
	dt:DC_1VDC << Format( "Engineering", 12 );
	dt:DC_3VDC << Format( "Engineering", 12 );
	dt << Contour Plot(
		X( :X, :Y),
		Y( :DC_1VDC ),
		Legend( 2 ),
		Show Contours( 1 ),
		Show Data Points( 1 ),
		Fill Areas( 1 ),
		Label Contours( 0 ),
		Color Theme( "Blue White Red" ),
		Specify Contours( min, max, N( 4 ) ),
	);

    //Close( dt, "nosave" );

  );
);

This JSL opens .CSV files in a directory and plots contour graphs for each.

 

The issue is that a dialog box opens to confirm the MAX/MIN and # of contour layers for each plot.

ChesterKnurek_0-1660830211843.png

 

How do you prevent this from happening?

 

Thankyou.

2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Contour map creation in JSL brings up MIN/MAX/#LAYERS diaglog for each graph

You might have to use separate << Specify Contours.

jthi_0-1660831470876.png

 

Slightly modified from scripting index example:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Little Pond.jmp");
obj = dt << Contour Plot(X(:X, :Y), Y(:Z));
min_c = -4; 
max_c =8;
obj << Specify Contours(
	Min(min_c),
	Max(max_c),
	N(4)
);

 Edit:

You seem to be missing Min and Max from the command and this seems to work also:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Little Pond.jmp");
min_c = -4;
max_c = 8;

obj = dt << Contour Plot(X(:X, :Y), Y(:Z), Specify Contours(Min(min_c), Max(max_c), N(4)));
-Jarmo

View solution in original post

txnelson
Super User

Re: Contour map creation in JSL brings up MIN/MAX/#LAYERS diaglog for each graph

The Specify Contours message needs to be specified outside of the Contour Plot definition.

 

	cp = dt << Contour Plot(
		X( :X, :Y),
		Y( :DC_1VDC ),
		Legend( 2 ),
		Show Contours( 1 ),
		Show Data Points( 1 ),
		Fill Areas( 1 ),
		Label Contours( 0 ),
		Color Theme( "Blue White Red" );
	xp << Specify Contours( min, max, N( 4 ) ));
Jim

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Contour map creation in JSL brings up MIN/MAX/#LAYERS diaglog for each graph

You might have to use separate << Specify Contours.

jthi_0-1660831470876.png

 

Slightly modified from scripting index example:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Little Pond.jmp");
obj = dt << Contour Plot(X(:X, :Y), Y(:Z));
min_c = -4; 
max_c =8;
obj << Specify Contours(
	Min(min_c),
	Max(max_c),
	N(4)
);

 Edit:

You seem to be missing Min and Max from the command and this seems to work also:

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Little Pond.jmp");
min_c = -4;
max_c = 8;

obj = dt << Contour Plot(X(:X, :Y), Y(:Z), Specify Contours(Min(min_c), Max(max_c), N(4)));
-Jarmo
txnelson
Super User

Re: Contour map creation in JSL brings up MIN/MAX/#LAYERS diaglog for each graph

The Specify Contours message needs to be specified outside of the Contour Plot definition.

 

	cp = dt << Contour Plot(
		X( :X, :Y),
		Y( :DC_1VDC ),
		Legend( 2 ),
		Show Contours( 1 ),
		Show Data Points( 1 ),
		Fill Areas( 1 ),
		Label Contours( 0 ),
		Color Theme( "Blue White Red" );
	xp << Specify Contours( min, max, N( 4 ) ));
Jim