cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Add Row legend to Control Chart

Hey all!

I'm working on some P-charts and I would like to add a legend. First thing I notice is that I can't "click my way" to adding one to a chart. I've tried forcing my script to add it, and that results in an error (as expected).

Any ideas how I can add a legend? I suspect it will involve more advanced scripting techniques, but I'm open :).

Cheers!
Chadd

Example Script:
asdf = Current Data Table() << Control Chart(
Sample Label( :week ),
Sample Size( :units ),
KSigma( 3 ),
Chart Col( :Blah, P ),
By( :stuff )
);

Report(asdf)[Frame Box(1)] << Row Legend (:week, color(1), marker(1));

Error:
Send Expects Scriptable Object in access or evaluation of 'Send' , Report( asdf )[Frame Box( 1 )] << Row Legend( :week, color( 1 ), Marker( 1 ) )
1 REPLY 1

Re: Add Row legend to Control Chart

I believe the error is because of the color and marker fields. If you run the command just with 

Report(asdf)[Frame Box(1)] << Row Legend (:week);

this should work fine. 

The legend will use the color settings in the column :week whic you would have to define in advance, best in the column properties as value labels or alternatively as Mark rows by column option using this column..

/****NeverStopLearning****/

Recommended Articles