Develop your First Plot Notebook
The Notebook View is where you bring in data, perform transformations in Python, and visualize your data.
Latch Plots’ Notebook view offers a familiar interface like Jupyter, where you can use Python and popular libraries such as pandas or scikit-learn to explore your data.
Latch Plots enriches the traditional notebook experience in two significant ways:
- No-Code, Interactive Plot/Visualization Cells: These cells allow you to create visualizations without writing code.
- User-Friendly Input Widgets: These widgets can be exposed to scientists, making the analysis more accessible.
In the next section, we will walk through how you can develop your first notebook, and rapidly turn it into a powerful visualization application.
Start a New Notebook
In the right sidebar click the + New Plot Layout button.
This will open up a creation modal where you can give your layout a name, select start from a Blank Layout and then click create.
Bring in Data
There are two ways you can bring in data:
Build Notebook Logic by Adding Cells
Latch Plots provides a wide variety of code and no-code cell types to help you create an interactive data analysis experience.
By interspersing Custom Data Analysis cells with user-friendly widgets, powered by Python code, and adding informative Text and Plot cells, you can enable scientists to further explore and personalize their data visualizations, creating an engaging and interactive plotting experience.
Create Your First Custom Data Analysis Cell and Exposing User-friendly Widgets to scientists
- Click the + Custom Data Analysis to add a Python cell.
- Once you click Run, a data selector widget with a Select File button will show up.
To follow along, you upload an example output file from a differential gene expression analysis workflow CoCl2 vs control (condition).csv, and select it in the file modal.
- Next, let’s add a selector widget to enable scientists to select their genes of interest, and filter the original data frame to only contain these genes.
Add the following code to your current Python cell:
- Rename your cell to something descriptive, like “Choose Genes of Interest.” This name will be helpful when you need to select the cell and choose which of its outputs to plot in the next step.
- All global Pandas DataFrames referenced in the code are displayed underneath the Custom Data Analysis cells by default.
Plot the Output of the Custom Data Analysis Cell
- Click + Plot to create a new Plot cell.
- For Data Source, select the upstream Custom Data Analysis cell labeled Choose Genes of Interest. Click filtered_df as the table you want to plot.
- In the Plot’s settings, you can select the plot types, X-axis, Y-axis, and more. Visit the Plots Overview page to learn about customizing plot appearances and advanced interactive features, such as visually editing a plot with table filters or displaying underlying data points with lasso select.
Turn Your Notebook into a No-code Plot Template
To hide the ability to edit code from end users, you can simply click Disable Dev Mode.
To turn the notebook into a template that can be reused by multiple scientists for future experiments, click on the three dots next to your notebook’s name, and select Save as a Template. Provide your template with a name and version.
That’s it! You’ve published the first interactive Plot Template to your workspace. 🎉
The next time a scientist needs to use the application for a new dataset, they can select + Plot Layout and choose a Plot Template you’ve published for them.
Was this page helpful?