Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Created:
Oct 30, 2020 05:51 PM
| Last Modified: Jun 11, 2023 4:07 AM(2367 views)
Suppose I have a baseline data set of the growth rate of bacteria A over time at room temperature and 40% humidity.
Then I run an experiment on bacteria B where I vary the temperature and humidity levels to see how those affect the growth rate, wanting to see them relative to bacteria A.
My columns are: bacteriaType, temp, humidity, time, growthRate
I'd like to do this: time -> X, growthRate -> Y, temp -> groupX, humidity -> groupY, and bacteriaType -> Overlay
... and have the reference data (bacteria A) be plotted on every plot behind the bacteria B data. But I don't have it for every temperature and humidity level.
Given your description, the base reference bacteria, bacteria a will be displayed on every graph that you have data for that combination of factors. If your question is, how do you get the base level a bacteria to show up in every graph, it is just a matter of replicating the growth rate data and time data for the combinations of factors that are missing.
I hope I am understanding what your want. If not, please tell me what I am not getting.
I was hoping to not have to replicate the same data for bacteria A 25 times to make it show up in each graph...
I wondered if there was a script I could use to generate the same plot, similar to how you can draw shapes into the plot windows with "Customize Graph", then adding a "script"?
Or if there was some way to have it assume that a given row/record should be plotted in the current plot if there is *no* data in the corresponding field as well as if the field matches the value represented by the column of plots?
It sounds daunting but replicating the data is can be done fairly quickly by joining the growth data to a table of the available options using a 'cartesian join' and then concatenating it to your original data. Here is an example
There's a function called "Y Function()" that lets me plot directly into each plot in Graph Builder using the "Customize Graph" window, which is super cool...
Is there a similar function that will let me plot data from the main data table via that same interface? That would solve my problem without requiring me to create a data table that's significantly larger.
The Customize option that is available from graphs in JMP is an interface into JMP's ability to use JSL to use base level graphic routines to add to the display. Here is a simple example taken from the Scripting Index.
The Y Function() is just one of the graphic primitives that are available to add to any displayed graph. Or, one can also write to a display object called Graph Box() and generate an original, stand alone graphical display.
All of these graphical functions are documented in the Scripting Index, under "Graphics"
So to answer you question,
Yes, you could add JSL to each of your graphs that would read from the original data table and plot the values. One would just have to write the JSL to take the values from the data table and use the Marker, Pen Color, Line, etc. functions to build the graphical display.
One caution about @txnelson's solution. It demonstrates the JSL capability that you asked about well. However, using variables in a graphics script can lead to unexpected and undesirable behavior. For example, such a script might break if you journal this window.
This concern depends on the larger context of your analysis plan.
@Mark_Bailey, would evaluating those variables first eliminate the behavior you mention, for example by replacing the last lines of @txnelson's script with this this?