Graph Builder: connect a subset of points with line segments and show only markers for the other pointsHello,
I am trying to use Graph Builder to connect a subset of points with line segments and show only markers for the other points. So that my plot looks something like this (lines here were added manually in a picture for illustration):

I tried utilizing a separate column to employ overlay capability and it indeed allows to plots separate lines for separate groups of points. But I was not able to remove the lines and leave only markers (or the other way around) for a single group of points.
In the JMP table I put the points that should be connected with a line as separate 4 points. Ideally, the last of these 4 points should be connected to the first of these 4 points.
The JMP file (JMP 18, regular version, not PRO) is attached.
Any suggestions or comments are greatly appreciated.
Thank you!
Vladimir
Data Exploration and VisualizationRe: Graph Builder: connect a subset of points with line segments and show only markers for the other points
I produced this interactively
- I added an additional Overlay Row to the data table to add the connecting line to finish where it started
- I then dragged the Overlay_column to the color drop box
- I then added a Line to the graph which displayed 2 lines
- I didn't want the black line so I simply set the line color for the black line to white
- That left the markers for the points for the non overlay data looking funny. This is because the former black line is displayed on top of the points.
- To move the black points to be displayed on top of the now white (invisible to the user_ lines, I right clicked on the graph and selected Customize
- I then selected the Marker 0 and using the down arrow, moved the black marker down past the Line(0)
- Which produced the final graph
Here is the JSL that will generate the graph
Graph Builder(
Show Control Panel( 0 ),
Variables(
X( :Ex ),
Y( :Gxy ),
Overlay( :overlay_column ),
Color( :overlay_column )
),
Elements(
Points( X, Y, Legend( 5 ) ),
Line( X, Y, Legend( 6 ), Row order( 1 ) )
),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model(
5,
Properties(
0,
{Line Color( 0 ), Marker( "FilledCircle" )},
Item ID( "0", 1 )
),
Properties( 1, {Marker( "Circle" )}, Item ID( "1", 1 ) )
), Legend Model(
6,
Properties( 0, {Line Color( 2 )}, Item ID( "0", 1 ) )
)}
),
Dispatch( {}, "Graph Builder", FrameBox, {Reorder Segs( {1, 2, 5, 6} )} )
)
);
There are other ways to handle this. Here is a straight forward JSL method that uses Add Graphic Script to draw the line

Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :Ex ), Y( :Gxy ) ),
Elements( Points( X, Y, Legend( 3 ) ) ),
SendToReport(
Dispatch( {}, "Gxy", ScaleBox,
{Min( 0.781114518510881 ), Max( 3.84890945699133 ), Inc( 0.5 ),
Minor Ticks( 0 )}
),
Dispatch( {}, "Graph Builder", FrameBox,
{Add Graphics Script(
2,
Description( "" ),
Pen Color( "Red" );
Line( {5, 1}, {5.5, 3.5}, {10, 3}, {11, 1.5}, {5, 1} );
)}
)
)
);
No overlay column and rows are required
Re: Graph Builder: connect a subset of points with line segments and show only markers for the other pointsHey @VladimirB ,
I could get something along the lines you want but this approach is really clunky as you really have to order the rows to make sure that the points link the way you want. So at this point it is not that you would just select the points and they would make a nice closed shape. But, since your data is correctly ordered in your example this does do what you want.

I created two new columns (col 4 and col 5) that only returned the values of the selected rows and then added a dummy row at the end that allowed col 4 and col 5 to return the lowest value selected, thus closing the shape.


I added column 4 as a second Y axis and column 5 as a second x axis and had the point element only respect Gxy and Ex and had the line element only respect Col4 and Col 5 in row order.
So like a said a bit clunky but it gets you there and might inspire you or another user to make something even better!
Steve
Re: Graph Builder: connect a subset of points with line segments and show only markers for the other pointsHey @VladimirB ,
So i wanted to make something interactive to create connected points like you were asking about so I came up with this script to be able to interactively link points. So attached is a script that you can use to select points and have them become connected by line segments.
When you run it, it will ask you what columns to use as the Y and x axis columns

When you press okay it will create three columns and then a new window will pop up:

At this point you can run the table script

which gives you this

Now you can select a point then click "set value" in the user interface window

you can then select a new point and press the "set value" button again to connect the two points

do this until all your points are selected

Once you have selected all the points click the "Finished" button to link the line to the starting point

If you missed a point you can select it and press "Set Value" which will make it look messed up for a second

but you can use the "Insert midway point" button to fix it. In this case point 8 should really be after point 5 so when you click the button you will put in 5 and press okay.

and Bam! the points are reordered

If you need to start over press the "Clear Values" button
Hope this helps! Also, I'm sure this is not robust to many different usages so high probability outside of the way I just showed the workflow to be it will have a bug.
Hey @hogi,
I'm sure you could make this be way more useful than I did.
Steve
Re: Graph Builder: connect a subset of points with line segments and show only markers for the other pointsThank you so much, TXNELSON!
You provided a very nice solution! With the great script! I will definitely try it!
I appreciate very much your fast and detailed response with all the guidelines!
~ Vladimir
Re: Graph Builder: connect a subset of points with line segments and show only markers for the other pointsThank you very much, SHAMPTON82!
You provided a very nice solution! I will try it out
I appreciate very much your fast and detailed response with all the guidelines!
And you made an interactive solution too!
This is very educational for me!
Thank you!
~ Vladimir