cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit. Register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
frankderuyck
Level VI

Cerate a parallel plot with NIR data

With gaph builder I would like to create a parallel plot with NIR data. I have tried but I get a very messy graph as shown in attached file, how can I make this plot like the one in the functional data explorer? 

1 ACCEPTED SOLUTION

Accepted Solutions
Victor_G
Super User

Re: Cerate a parallel plot with NIR data

Hi @frankderuyck,

 

You will need your data in a stacked format to realize a similar plot with Graph Builder.

Here are the steps to have the graph you want :

  1. Stack your datatable (all the wavelengths columns), change the names Label and Data as "Wavelength" and "Intensity" for example :
    Victor_G_0-1724239454954.png

    Script for this operation : 

    // Stack data table
    // → Data Table( "Stacked_table_NIR" )
    Data Table( "PARALLEL PLOT NIR" ) << Stack(
    	columns(
    		:"5643"n, :"5650"n, :"5656"n, :"5663"n, :"5669"n, :"5675"n, :"5682"n,
    		:"5688"n, :"5695"n, :"5701"n, :"5708"n, :"5714"n, :"5721"n, :"5727"n,
    		:"5734"n, :"5741"n, :"5747"n, :"5754"n, :"5760"n, :"5767"n, :"5774"n,
    		:"5780"n, :"5787"n, :"5794"n, :"5800"n, :"5807"n, :"5814"n, :"5821"n,
    		:"5828"n, :"5834"n, :"5841"n, :"5848"n, :"5855"n, :"5862"n, :"5869"n,
    		:"5875"n, :"5882"n, :"5889"n, :"5896"n, :"5903"n, :"5910"n, :"5917"n,
    		:"5924"n, :"5931"n, :"5938"n, :"5945"n, :"5952"n, :"5959"n, :"5967"n,
    		:"5974"n, :"5981"n, :"5988"n, :"5995"n, :"6002"n, :"6010"n, :"6017"n,
    		:"6024"n, :"6031"n, :"6039"n, :"6046"n, :"6053"n, :"6061"n, :"6068"n,
    		:"6075"n, :"6083"n, :"6090"n, :"6098"n, :"6105"n, :"6112"n, :"6120"n,
    		:"6127"n, :"6135"n, :"6143"n, :"6150"n, :"6158"n, :"6165"n, :"6173"n,
    		:"6180"n, :"6188"n, :"6196"n, :"6203"n, :"6211"n, :"6219"n, :"6227"n,
    		:"6234"n, :"6242"n, :"6250"n, :"6258"n, :"6266"n, :"6274"n, :"6281"n,
    		:"6289"n, :"6297"n, :"6305"n, :"6313"n, :"6321"n, :"6329"n, :"6337"n,
    		:"6345"n, :"6353"n, :"6361"n, :"6369"n, :"6378"n, :"6386"n, :"6394"n,
    		:"6402"n, :"6410"n, :"6418"n, :"6427"n, :"6435"n, :"6443"n, :"6452"n,
    		:"6460"n, :"6468"n, :"6477"n, :"6485"n, :"6494"n, :"6502"n, :"6510"n,
    		:"6519"n, :"6527"n, :"6536"n, :"6545"n, :"6553"n, :"6562"n, :"6570"n,
    		:"6579"n, :"6588"n, :"6596"n, :"6605"n, :"6614"n, :"6623"n, :"6631"n,
    		:"6640"n, :"6649"n, :"6658"n, :"6667"n, :"6676"n, :"6684"n, :"6693"n,
    		:"6702"n, :"6711"n, :"6720"n, :"6729"n, :"6739"n, :"6748"n, :"6757"n,
    		:"6766"n, :"6775"n, :"6784"n, :"6793"n, :"6803"n, :"6812"n, :"6821"n,
    		:"6831"n, :"6840"n, :"6849"n, :"6859"n, :"6868"n, :"6878"n, :"6887"n,
    		:"6897"n, :"6906"n, :"6916"n, :"6925"n, :"6935"n, :"6944"n, :"6954"n,
    		:"6964"n, :"6974"n, :"6983"n, :"6993"n, :"7003"n, :"7013"n, :"7022"n,
    		:"7032"n, :"7042"n, :"7052"n, :"7062"n, :"7072"n, :"7082"n, :"7092"n,
    		:"7102"n, :"7112"n, :"7123"n, :"7133"n, :"7143"n, :"7153"n, :"7163"n,
    		:"7174"n, :"7184"n, :"7194"n, :"7205"n, :"7215"n, :"7225"n, :"7236"n,
    		:"7246"n, :"7257"n, :"7267"n, :"7278"n, :"7289"n, :"7299"n, :"7310"n,
    		:"7321"n, :"7331"n, :"7342"n, :"7353"n, :"7364"n, :"7375"n, :"7386"n,
    		:"7396"n, :"7407"n, :"7418"n, :"7429"n, :"7440"n, :"7452"n, :"7463"n,
    		:"7474"n, :"7485"n, :"7496"n, :"7508"n, :"7519"n, :"7530"n, :"7541"n,
    		:"7553"n, :"7564"n, :"7576"n, :"7587"n, :"7599"n, :"7610"n, :"7622"n,
    		:"7634"n, :"7645"n, :"7657"n, :"7669"n, :"7680"n, :"7692"n, :"7704"n,
    		:"7716"n, :"7728"n, :"7740"n, :"7752"n, :"7764"n, :"7776"n, :"7788"n,
    		:"7800"n, :"7813"n, :"7825"n, :"7837"n, :"7849"n, :"7862"n, :"7874"n,
    		:"7886"n, :"7899"n, :"7911"n, :"7924"n, :"7937"n, :"7949"n, :"7962"n,
    		:"7974"n, :"7987"n, :"8000"n, :"8013"n, :"8026"n, :"8039"n, :"8052"n,
    		:"8065"n, :"8078"n, :"8091"n, :"8104"n, :"8117"n, :"8130"n, :"8143"n,
    		:"8157"n, :"8170"n, :"8183"n, :"8197"n, :"8210"n, :"8224"n, :"8237"n,
    		:"8251"n, :"8264"n, :"8278"n, :"8292"n, :"8306"n, :"8319"n
    	),
    	Source Label Column( "Wavelength" ),
    	Stacked Data Column( "Intensity" ),
    	Output Table( "Stacked_table_NIR" )
    );
  2. Change the data type and modeling type of "Wavelength" as Numeric and Continuous.
  3. Use Graph Builder, set "Wavelength" as X, "Intensity" as Y, and you'll get the Graph :
    Victor_G_1-1724239594618.png

     

This graph is not a paralell plot, as a paralell plot has "independant" scales for each variable to allow for better pattern detection/recognition. More infos here : https://www.data-to-viz.com/graph/parallel.html

You can find attached your datatable, with the scripts added for the stacked table and the Graph Builder (script in the stacked table).

I hope this answer will help you,

Victor GUILLER
Scientific Expertise Engineer
L'Oréal - Data & Analytics

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Cerate a parallel plot with NIR data

Which plot are you looking for? I don't see parallel plot in your functional data explorer script

jthi_2-1724239307431.png

 

Are you looking for something like this?

jthi_0-1724239184959.png

or this?

jthi_1-1724239226529.png

(these have been created by first stacking the data)

-Jarmo
Victor_G
Super User

Re: Cerate a parallel plot with NIR data

Hi @frankderuyck,

 

You will need your data in a stacked format to realize a similar plot with Graph Builder.

Here are the steps to have the graph you want :

  1. Stack your datatable (all the wavelengths columns), change the names Label and Data as "Wavelength" and "Intensity" for example :
    Victor_G_0-1724239454954.png

    Script for this operation : 

    // Stack data table
    // → Data Table( "Stacked_table_NIR" )
    Data Table( "PARALLEL PLOT NIR" ) << Stack(
    	columns(
    		:"5643"n, :"5650"n, :"5656"n, :"5663"n, :"5669"n, :"5675"n, :"5682"n,
    		:"5688"n, :"5695"n, :"5701"n, :"5708"n, :"5714"n, :"5721"n, :"5727"n,
    		:"5734"n, :"5741"n, :"5747"n, :"5754"n, :"5760"n, :"5767"n, :"5774"n,
    		:"5780"n, :"5787"n, :"5794"n, :"5800"n, :"5807"n, :"5814"n, :"5821"n,
    		:"5828"n, :"5834"n, :"5841"n, :"5848"n, :"5855"n, :"5862"n, :"5869"n,
    		:"5875"n, :"5882"n, :"5889"n, :"5896"n, :"5903"n, :"5910"n, :"5917"n,
    		:"5924"n, :"5931"n, :"5938"n, :"5945"n, :"5952"n, :"5959"n, :"5967"n,
    		:"5974"n, :"5981"n, :"5988"n, :"5995"n, :"6002"n, :"6010"n, :"6017"n,
    		:"6024"n, :"6031"n, :"6039"n, :"6046"n, :"6053"n, :"6061"n, :"6068"n,
    		:"6075"n, :"6083"n, :"6090"n, :"6098"n, :"6105"n, :"6112"n, :"6120"n,
    		:"6127"n, :"6135"n, :"6143"n, :"6150"n, :"6158"n, :"6165"n, :"6173"n,
    		:"6180"n, :"6188"n, :"6196"n, :"6203"n, :"6211"n, :"6219"n, :"6227"n,
    		:"6234"n, :"6242"n, :"6250"n, :"6258"n, :"6266"n, :"6274"n, :"6281"n,
    		:"6289"n, :"6297"n, :"6305"n, :"6313"n, :"6321"n, :"6329"n, :"6337"n,
    		:"6345"n, :"6353"n, :"6361"n, :"6369"n, :"6378"n, :"6386"n, :"6394"n,
    		:"6402"n, :"6410"n, :"6418"n, :"6427"n, :"6435"n, :"6443"n, :"6452"n,
    		:"6460"n, :"6468"n, :"6477"n, :"6485"n, :"6494"n, :"6502"n, :"6510"n,
    		:"6519"n, :"6527"n, :"6536"n, :"6545"n, :"6553"n, :"6562"n, :"6570"n,
    		:"6579"n, :"6588"n, :"6596"n, :"6605"n, :"6614"n, :"6623"n, :"6631"n,
    		:"6640"n, :"6649"n, :"6658"n, :"6667"n, :"6676"n, :"6684"n, :"6693"n,
    		:"6702"n, :"6711"n, :"6720"n, :"6729"n, :"6739"n, :"6748"n, :"6757"n,
    		:"6766"n, :"6775"n, :"6784"n, :"6793"n, :"6803"n, :"6812"n, :"6821"n,
    		:"6831"n, :"6840"n, :"6849"n, :"6859"n, :"6868"n, :"6878"n, :"6887"n,
    		:"6897"n, :"6906"n, :"6916"n, :"6925"n, :"6935"n, :"6944"n, :"6954"n,
    		:"6964"n, :"6974"n, :"6983"n, :"6993"n, :"7003"n, :"7013"n, :"7022"n,
    		:"7032"n, :"7042"n, :"7052"n, :"7062"n, :"7072"n, :"7082"n, :"7092"n,
    		:"7102"n, :"7112"n, :"7123"n, :"7133"n, :"7143"n, :"7153"n, :"7163"n,
    		:"7174"n, :"7184"n, :"7194"n, :"7205"n, :"7215"n, :"7225"n, :"7236"n,
    		:"7246"n, :"7257"n, :"7267"n, :"7278"n, :"7289"n, :"7299"n, :"7310"n,
    		:"7321"n, :"7331"n, :"7342"n, :"7353"n, :"7364"n, :"7375"n, :"7386"n,
    		:"7396"n, :"7407"n, :"7418"n, :"7429"n, :"7440"n, :"7452"n, :"7463"n,
    		:"7474"n, :"7485"n, :"7496"n, :"7508"n, :"7519"n, :"7530"n, :"7541"n,
    		:"7553"n, :"7564"n, :"7576"n, :"7587"n, :"7599"n, :"7610"n, :"7622"n,
    		:"7634"n, :"7645"n, :"7657"n, :"7669"n, :"7680"n, :"7692"n, :"7704"n,
    		:"7716"n, :"7728"n, :"7740"n, :"7752"n, :"7764"n, :"7776"n, :"7788"n,
    		:"7800"n, :"7813"n, :"7825"n, :"7837"n, :"7849"n, :"7862"n, :"7874"n,
    		:"7886"n, :"7899"n, :"7911"n, :"7924"n, :"7937"n, :"7949"n, :"7962"n,
    		:"7974"n, :"7987"n, :"8000"n, :"8013"n, :"8026"n, :"8039"n, :"8052"n,
    		:"8065"n, :"8078"n, :"8091"n, :"8104"n, :"8117"n, :"8130"n, :"8143"n,
    		:"8157"n, :"8170"n, :"8183"n, :"8197"n, :"8210"n, :"8224"n, :"8237"n,
    		:"8251"n, :"8264"n, :"8278"n, :"8292"n, :"8306"n, :"8319"n
    	),
    	Source Label Column( "Wavelength" ),
    	Stacked Data Column( "Intensity" ),
    	Output Table( "Stacked_table_NIR" )
    );
  2. Change the data type and modeling type of "Wavelength" as Numeric and Continuous.
  3. Use Graph Builder, set "Wavelength" as X, "Intensity" as Y, and you'll get the Graph :
    Victor_G_1-1724239594618.png

     

This graph is not a paralell plot, as a paralell plot has "independant" scales for each variable to allow for better pattern detection/recognition. More infos here : https://www.data-to-viz.com/graph/parallel.html

You can find attached your datatable, with the scripts added for the stacked table and the Graph Builder (script in the stacked table).

I hope this answer will help you,

Victor GUILLER
Scientific Expertise Engineer
L'Oréal - Data & Analytics
frankderuyck
Level VI

Re: Cerate a parallel plot with NIR data

Thanks Victor, not possible to get one scale for parallel plots? There's not a lot difference among the NIR intensities.