cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
SDF1
Super User

JSL how to change the color of a single column in a Pareto plot?

Hi All,

 

  I'm interested in using JSL to change the color of a single bar (or perhaps multiple bars) in a Pareto Plot and not rely on the interactive row selection of a data table to do so.

 

  I found these two helpful discussions here and here, but they're not quite what I'm after. I can of course make the graph using Graph Builder instead of the Pareto Plot platform, that's not the problem necessarily. After a lot of searching, haven't really found how to do it as I would like.

 

  I'd prefer to not have to create a Transformed column, like in one of the examples, and I'd also prefer not to change the preferences within JMP. 

 

  For example, using the Car.jmp file, and making a Pareto Plot of :Make as the Cause and :Wt as the Freq, I'd like to color a few specific columns. In the screenshot below, the car Makes Chevrolet, Toyota, and Honda are selected and "highlighted", but I'd like to make these a specific color (eg: red, or black, or green) -- hopefully using JSL.

SDF1_0-1696619938359.png

 

  Any thoughts/suggestions are much appreciated.

 

Thanks!,

DS

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: JSL how to change the color of a single column in a Pareto plot?

Pareto plot seems to offer option of coloring selected causes

jthi_0-1696622318727.png

 

And JMP will give you a script like this (using Failure Raw Data)

Pareto Plot(
	Cause(:failure),
	Cause Colors(
		{{"contamination", "Gray"}, {"oxide defect", "Red"}
		}
	),
	SendToReport(
		Dispatch(
			{"Plots"},
			"",
			TextEditBox,
			{Rotate Text("Left"), Set Wrap(277), Set Base Font("Axis Title")}
		),
		Dispatch(
			{"Plots"},
			"",
			Text Edit Box(2),
			{Rotate Text("Right"), Set Wrap(277), Set Base Font("Axis Title")}
		),
		Dispatch(
			{"Plots"},
			"",
			Text Edit Box(3),
			{Set Wrap(277), Set Base Font("Axis Title")}
		)
	)
)

So you should be able to color them by building value,color pairs into a list

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: JSL how to change the color of a single column in a Pareto plot?

Pareto plot seems to offer option of coloring selected causes

jthi_0-1696622318727.png

 

And JMP will give you a script like this (using Failure Raw Data)

Pareto Plot(
	Cause(:failure),
	Cause Colors(
		{{"contamination", "Gray"}, {"oxide defect", "Red"}
		}
	),
	SendToReport(
		Dispatch(
			{"Plots"},
			"",
			TextEditBox,
			{Rotate Text("Left"), Set Wrap(277), Set Base Font("Axis Title")}
		),
		Dispatch(
			{"Plots"},
			"",
			Text Edit Box(2),
			{Rotate Text("Right"), Set Wrap(277), Set Base Font("Axis Title")}
		),
		Dispatch(
			{"Plots"},
			"",
			Text Edit Box(3),
			{Set Wrap(277), Set Base Font("Axis Title")}
		)
	)
)

So you should be able to color them by building value,color pairs into a list

-Jarmo
SDF1
Super User

Re: JSL how to change the color of a single column in a Pareto plot?

Hi @jthi ,

 

  Thanks for the info and pointing out that the Pareto platform already has a built-in option for coloring columns. Once I was able to build the nested list correctly, I was able to pass it to the Pareto platform and it works great.

 

Thanks!,

DS