I am trying to create an overlay plot that uses a line for the left axis and a bar for the right axis. I can plot two lines in an overlay but not a line and a bar. I can plot a line and a bar in a chart (as opposed to the overlay platform), but not get them on seperate y axes- they are both on the left.
For what it's worth, I am trying to do this in JMP 8 and would like to find a scriptable solution that doesn't require JMP9.
Thanks.
You can do it in Graph Builder with JMP 9, but I can't think of a way in JMP 8.
Drag two variables together to Y, drag another variable to X. In contexual menu (right click on Y) pick "Move Right" and select one of the variables. Then it is possible to independently select any graph type for the left and right Y variables.
JSL example:
Open( "$ENGLISH_SAMPLE_DATA/Big Class.jmp" ) << Graph Builder(
Variables( X( :age ), Y( :height ), Y( :weight, Position( 1 ), Side( "Right" ) ) ),
Elements(
Line( X, Y( 1 ), Summary Statistic( "Mean" ) ),
Bar( X, Y( 2 ), Summary Statistic( "Mean" ) )
)
);
You can do it in Graph Builder with JMP 9, but I can't think of a way in JMP 8.
Thanks. That was the conclusion I had reached as well.The closest I got was changing one of the Y axes to a "needle" type and increasing the line width to make it look like a bar.
This is a very useful question in using Graph builder of JMP 9. Also here i often try to plot such graph but have not way. I wonder if Xan could give us more instruction on an example of using JMP 9 graph builder to plot an overlay that uses a line for the left axis and a bar for the right axis?
Drag two variables together to Y, drag another variable to X. In contexual menu (right click on Y) pick "Move Right" and select one of the variables. Then it is possible to independently select any graph type for the left and right Y variables.
JSL example:
Open( "$ENGLISH_SAMPLE_DATA/Big Class.jmp" ) << Graph Builder(
Variables( X( :age ), Y( :height ), Y( :weight, Position( 1 ), Side( "Right" ) ) ),
Elements(
Line( X, Y( 1 ), Summary Statistic( "Mean" ) ),
Bar( X, Y( 2 ), Summary Statistic( "Mean" ) )
)
);
Thanks to MS for providing an example. It's intentional that the dual-scale feature is somewhat buried. It's just too likely to produce a misleading graph. See
http://www.perceptualedge.com/articles/visual_business_intelligence/dual-scaled_axes.pdf