cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Leo_Huang
Level I

assign marker style(line style) by "string" or specific "value" in column

Is it possible to assign the marker style by group name??Taking this script for example,I want to  let column "mean" line-style always be  dashed and column "Range" line-style be solid in the all page(page by process step) of graph.Some of my page(process step) don't have the "Mean"data.If I script like this,the line style will not fixed at all my plot.

Graph Builder(
	Size( 562, 477 ),
	Variables( X( :date ), Y( :Mean ), Y( :Range, Position( 1 ) ) ),
	Elements(
		Line( X, Y( 1 ), Y( 2 ), Legend( 9 ) ),
		Points( X, Y( 1 ), Y( 2 ), Legend( 10 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				9,
				Properties( 0, {Line Style( "Dashed" )} ),
				Properties( 1, {Line Style( "Solid" )} )
			)}
		),
		Dispatch( {}, "Graph Builder", FrameBox, {Marker Size( 3 )} )
	)
);

I am trying to did like the following script. I assign the properties to a "string"(or a sepecific value in a column).But it doesn't works. Could anyone help?? Thanks! 

Properties( "Mean", {Line Style( "Dashed" )} ),
Properties( "Range", {Line Style( "Dashed" )} ),
 

 

1 REPLY 1
txnelson
Super User

Re: assign marker style(line style) by "string" or specific "value" in column

Here is a sample that I believe matches what you want

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );

// Set the X column to be continuous to match your sample
dt:age << modeling type( continuous );

// Set the markers
dt << color or mark by column( :sex, marker theme( solid ) );

// Create the chart
Graph Builder(
	Size( 534, 490 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ), Y( :weight, Position( 1 ) ), Group X( :sex ) ),
	Elements(
		Points( X, Y( 1 ), Y( 2 ), Legend( 8 ) ),
		Line( X, Y( 1 ), Y( 2 ), Legend( 10 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model( 10, Properties( 0, {Line Style( "Dotted" )} ) )}
		)
	)
);

The best way to generate the script for things like this is to run the sample interactively, getting it the way you want it, and then to simply Save the Script from under the red triangle.  

 

Jim