cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
Choose Language Hide Translation Bar
babn
Level II

Is there a way to add points to only one line in a Graph Builder Line Plot?

Hi All,

 

I have a Y over X graph builder plot with multiple lines, their name in the Overlay, and colored by designation. I would like to add points only to one line. Is that possible? For example, how would I add points only to the Rosy line?  

babn_0-1758760906565.png

 

 

Your suggestions are much appreciated.

Barbara

 

 

 

 

4 REPLIES 4
txnelson
Super User

Re: Is there a way to add points to only one line in a Graph Builder Line Plot?

Add a new column and place only a copy of Rosy values into the new column.  Then add this new column to the y axis.  Then in the variables section, uncheck everything except Days and the new column.  In my example I called the new column Points.

txnelson_0-1758765639469.png

 

Jim
hogi
Level XIII

Re: Is there a way to add points to only one line in a Graph Builder Line Plot?

If you don't want to change the data table, you can add points (for all 3 lines) and use the legend/right click to reduce the transparency for 2 of them:

hogi_0-1758782229948.png

hogi_6-1758784282582.png

Graph Builder(
	Variables( X( :Days ), Y( :Values ), Overlay( :Kid ) ),
	Elements( Line( X, Y, Legend( 1 ) ), Points( X, Y, Legend( 2 ) ) ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				2,

				Properties( 1, {Transparency( 0 )}, Item ID( "Pepper", 1 ) ),
				Properties( 2, {Transparency( 0 )}, Item ID( "Rosy", 1 ) )
			)}
		)
	)
);

 

hogi
Level XIII

Re: Is there a way to add points to only one line in a Graph Builder Line Plot?

For a more advanced analysis (e.g. if there are dozens of entries and you don't want to reduce the transparency X times), you can:

  1. use a transform column to calculate 1/0 for data with & without marker  (here: fruit = "Pears")
  2. use this transform column as "color"
  3. then you just have to adjust 2 settings instead of dozens of  entries

hogi_5-1758784159371.png

 

 

Graph Builder(
	Transform Column( "Rosy", Nominal, Formula( If( :Kid == "Rosy", "Rosy" ) ) ),
	Variables(
		X( :Days ),
		Y( :Values ),
		Overlay( :Kid ),
		Color( :Fruit ),
		Color( :Rosy )
	),
	Elements(
		Line( X, Y, Color( 1 ), Color( 1 ), Legend( 1 ) ),
		Points( X, Y, Overlay( 0 ), Color( 2 ), Legend( 2 ) )
	),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				2,
				Properties( 0, {Transparency( 0 )}, Item ID( "Missing", 1 ) )
			)}
		)
	)
);


If there is a conflict for overlay or color, you can disable or enable them separately for specific graphs:

hogi_1-1758782855619.png

 

In Graph Builder, this can be done via the variables drop down menu:

hogi_2-1758782893338.png

hogi
Level XIII

Re: Is there a way to add points to only one line in a Graph Builder Line Plot?

You can find more details about color settings in the post.
 Why is this DropZone called "Color" 

 

The "Remote Control" in the  Graph Builder Toolbar allows you to set colors and transparency very easily.
https://marketplace.jmp.com/appdetails/Graph+Builder+Toolbar 

hogi_3-1758783168674.png

e.g. batch assign of Transparency =0.1 to all items but one.

 

Here is a video showing how the remote control can be used:
https://community.jmp.com/t5/Discussions/Why-is-this-DropZone-called-quot-Color-quot/m-p/799820/high... 

Recommended Articles