Subscribe Bookmark RSS Feed

how do I change the histogram color with scripting?

how do I change the color of my histogram using JSL?

also, how do i change the color and size of my normal continuous fit line?

how do i format my x axis as a percent?
3 REPLIES
mpb

Super User

Joined:

Jun 23, 2011

I think it may not be possible to change the color or size of the continuous fit line.

As for the other 2, make the changes interactively and then save script to a script window. This will reveal the necessary syntax for coloring a histogram and showing the horizontal axis as a probability (assuming you use the default orientation for histograms).
changing the color in the interactive view does not change the color in the scipt. also, you can change the continuous fit line by right clicking on the histogram and go to customize. i would like to know how to add this to the script though.
ms

Super User

Joined:

Jun 23, 2011

If using customize to manually change the e.g. histogram fill color and then choose "Save script to script window" under the top level red triangle, you will get a script of the current state of your distribution. Your customizations are found within the dispatch-function, which you can copy to your main script and customize futher (a great way to interactively learn JSL!). However, as pointed out above the color settings of the continuous-fit curves seem not to be preserved in the saved script, which may seem odd.

There is a trick, though.

JMP adds a new color for each new fitted curve. The order seem to be predefined. You can just run a number of identical curves until JMP picks a color you can live with and thereafter remove all the redundant ones

Here's an example script of this. Play around with the value of ColorID.