cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Claire
Level I

Remove line between last point of a curve and 1st point of next curve

I have 4 variables - let's call them X, Y, sweep and batch.

X and Y are numerical continuous, sweep and batch are numeric nominal.

I want to plot XY line curves, per sweep and batch.

The data looks like:

X       Y       sweep      batch

0.10    0.20      1               1

0.11    0.30      1               1

0.15    0.36      1               1

0.12    0.22      1               2

0.13    0.31      1               2

0.14    0.29      1               2

0.09    0.2      1               3

0.12    0.33      1               3

0.11    0.31      1               3

0.14    0.24      2              1

0.10    0.34      2              1

0.11    0.30      2              1

0.13    0.21      2              2

0.16    0.22      2              2

0.18    0.33      2              2

0.12    0.21      3              3

0.17    0.27      3              3

0.19    0.29      3              3

 

I use the overlay for sweep and color for batch.

The graph puts a line between my last point of a (sweep,batch) to the 1st point of the next (sweep,batch).

I think in jmp17, this was resolved by clicking 'Row order' but no luck with jmp18.

Can someone help, please?

 

10 REPLIES 10
jthi
Super User

Re: Remove line between last point of a curve and 1st point of next curve

This is the plot I get, which connection is incorrect?

jthi_0-1770757983092.png

 

-Jarmo
miguello
Level VII

Re: Remove line between last point of a curve and 1st point of next curve

I think this was the intention:
sweep_batch_table.pngsweep_batch.png

hogi
Level XIII

Re: Remove line between last point of a curve and 1st point of next curve

so, you want to get these curves into a single graph?

hogi_6-1770782391043.png

 

... without the zig-zag lines discussed in Graph Builder. Combine Smoother and Line - how? :

hogi_2-1770781082032.png

hogi
Level XIII

Re: Remove line between last point of a curve and 1st point of next curve

Then indeed, @miguello 's approach is the key - just activate row order() to get the lines right:

hogi_7-1770783311697.png

Graph Builder(
	Transform Column( "Concatenate[sweep,batch]", Character, Formula( Char(:sweep) || "_" || Char( :batch ) ) ),
	Variables(
		X( :X ),
		Y( :Y ),
		Overlay( :"Concatenate[sweep,batch]"n, Overlay Encoding( "None" ) ),
		Color( :batch )
	),
	Elements( Points( X, Y ), Line( X, Y, Ordering( "Row Order" ) ) )
);

 

In addition:

For sorted data (with ascending X values per trace)

dt << Sort(By( :sweep, :batch, :X ));


there will be a cool new setting in JMP20:  Row Ascending
https://community.jmp.com/t5/JMP-Wish-List/Graph-Builder-Line-possibility-to-add-breaks/idc-p/929879... 

-> It makes it really easy to generate plots like this:

hogi_4-1770781886006.png

Graph Builder(
	Variables( X( :X ), Y( :Y ), Overlay( :batch ) ),
	Elements( Points( X, Y ), Line( X, Y, Ordering( "Row Ascending" ) ) )
);

 

Claire
Level I

Re: Remove line between last point of a curve and 1st point of next curve

thanks all for the prompt help - much appreciated.

Altogether, I did not want to concatenate cols because there are lots of cols I'm grouping by to visualise the impact (I like looking at raw data 1st). If I add empty rows for the data, keeping batch and sweep filled, your solution works perfect. 

My tables have ~10M lines though, I guess I need to get scripting. Pity there is no tick a box anywhere to discontinue the curves, would be much better than have to add thousands of lines to my tables...

hogi
Level XIII

Re: Remove line between last point of a curve and 1st point of next curve

Good news: you don't have to add any column to the data table.
In the report, select 100 columns - right click - concatenate. That's it.
Claire
Level I

Re: Remove line between last point of a curve and 1st point of next curve

Thanks hogi - with in the 'report' do you mean in the 'table' - I'm not finding the 'concatenate' - apologies not that agile in JMP

hogi
Level XIII

Re: Remove line between last point of a curve and 1st point of next curve

report -> plot window.
select the columns, right click:

hogi_0-1770832526308.png

 



Claire
Level I

Re: Remove line between last point of a curve and 1st point of next curve

Thanks miguello for your help - you are correct - your plot is close to what I wanted (but I wanted sweeps in solid/dots/dashed and batches in different colors to differentiate the type of variables) I'll reply to the latest comment - to you / jthi and hogi

Recommended Articles