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
EricTsai
Level III

To fill areas based on the value of the Y variable

Hi ,

Could JMP do the graph like this?

I need to fill the areas above certain values on Y axis

擷取.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
julian
Community Manager Community Manager

Re: To fill areas based on the value of the Y variable

Hi @EricTsai,

Unless you wish to go a scripting route, I can think of two ways to get Graph Builder to create this plot

 

1. Use a Stacked Area chart using two columns, one that indicates the amount of Y up to your cut off point, and another that indicates the amount of Y beyond your cutoff point (you can create these columns with simple column formulas, see attached data table). Now, you can now use both of these columns as your Y (drag them both to the Y-axis in Graph Builder simultaneously), select the Area plot on the element ribbon, and use "Stacked" under the Area Style on the left-hand side control panel. Add your X axis, and then your reference line by double-clicking the Y axis to enter Axis settings. Once you're finished, that will give you a plot such as this:

 

salesbydate.png

I've attached a data table with the columns I'd need for these data with a cut-off of 180. I also saved a script for the graph so you can see how it was generated. If you need more detailed instructions for creating this plot I would be happy to provide them.

 

2. Another way to do this which does not involve creating new columns is to plot your Y variable twice, one above and one below, and change the scale of each to meet at your cutpoint (I do it manually below, but double-clicking each Y axis to set it specifically is best).  Next, add the area plot, then right click > customize each to set the color you want for the polygon. Here's a quick video demonstrating that:

 

I hope this helps get you closer!

@julian 

 

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: To fill areas based on the value of the Y variable

I could not figure out how to make Graph Builder get the chart you want. Maybe another Community member with stronger Graph Builder skills can do that. However, JMP can draw this chart by using JSL to create the desired graph from scratch, or by adding JSL to an existing graph platform, to give it the finishing touches.
Jim
julian
Community Manager Community Manager

Re: To fill areas based on the value of the Y variable

Hi @EricTsai,

Unless you wish to go a scripting route, I can think of two ways to get Graph Builder to create this plot

 

1. Use a Stacked Area chart using two columns, one that indicates the amount of Y up to your cut off point, and another that indicates the amount of Y beyond your cutoff point (you can create these columns with simple column formulas, see attached data table). Now, you can now use both of these columns as your Y (drag them both to the Y-axis in Graph Builder simultaneously), select the Area plot on the element ribbon, and use "Stacked" under the Area Style on the left-hand side control panel. Add your X axis, and then your reference line by double-clicking the Y axis to enter Axis settings. Once you're finished, that will give you a plot such as this:

 

salesbydate.png

I've attached a data table with the columns I'd need for these data with a cut-off of 180. I also saved a script for the graph so you can see how it was generated. If you need more detailed instructions for creating this plot I would be happy to provide them.

 

2. Another way to do this which does not involve creating new columns is to plot your Y variable twice, one above and one below, and change the scale of each to meet at your cutpoint (I do it manually below, but double-clicking each Y axis to set it specifically is best).  Next, add the area plot, then right click > customize each to set the color you want for the polygon. Here's a quick video demonstrating that:

 

I hope this helps get you closer!

@julian 

 

EricTsai
Level III

Re: To fill areas based on the value of the Y variable

Thanksa a lot!!!!!

this is exactly what I want~

Re: To fill areas based on the value of the Y variable

If you are planning to save to Interactive HTML or publish to JMP public, use the first method.