Hi @billi ,
Sure, so in the example that I posted, I used the Big Class.jmp file, which you can find in the Help > Sample Index menu.
The first thing you'll want to do is change your preferences so the graph spacing is zero, not just unchecked (default).
This time, I actually set the graph spacing to 0. Last time, I just unchecked the box in preferences (leaves vertical line as before), but if you actually set it to 0, then there is no vertical line separating the graphs. To get to preferences, go File > Preferences, Select Platforms and then scroll down to select Graph Builder:
Make sure the checkbox for Graph Spacing is marked, and then set the spacing to 0.
Go to Graph Builder, then you can click and drag your columns to the respective axes. Here it is with just one column for each axis:
If you click and drag your same column for the x-axis and then move it off to the right of the original axis, like so:
you'll get a graph with the same curve on two axes. Double click the left axis and you'll get the axis setting window, this is the default:
Chang ethe Maximum value for the x-axis to whatever your new x2 value is, in this case I'm choosing 60, and change the Increment value to whatever you want. In this case 1, then click OK:
and your graph will now look like this:
You'll do something similar for the right x-axis, but change the Minimum to the same value as what you had before for the maximum on the other axis, in this case 60. I'm leaving the max default to what it says, and changing the Increment to 10. Click OK.
Your graph should now look like this:
To change the color of the second graph, right click the marker icon (do the same for the line icon), and select the correct color so that it's the same as the left-hand graph:
Your graph should now look like this:
Below is the JSL code saved to a scripting window that was used to generate the above graph
Graph Builder(
Graph Spacing( 0 ),
Variables( X( :height ), X( :height ), Y( :weight ) ),
Elements(
Position( 1, 1 ),
Points( X, Y, Legend( 26 ) ),
Smoother( X, Y, Legend( 27 ) )
),
Elements(
Position( 2, 1 ),
Points( X, Y, Legend( 28 ) ),
Smoother( X, Y, Legend( 29 ) )
),
SendToReport(
Dispatch(
{},
"height",
ScaleBox,
{Min( 50 ), Max( 60 ), Inc( 1 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"height",
ScaleBox( 2 ),
{Min( 60 ), Max( 70.76 ), Inc( 10 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
28,
Properties( 0, {Line Color( 5 )}, Item ID( "weight", 1 ) )
), Legend Model(
29,
Properties( 0, {Line Color( 5 )}, Item ID( "Smooth", 1 ) )
)}
)
)
);
I hope this helps.
Good luck!,
DS