Start using Pluto
What is a Notebook?
The images in this section were created on a computer with the Dark Mode enabled. Except for the color pallete, everything should be positioned and work exactly the same for a user in Light Mode.
If your graphical environment isn’t as greyish, don’t worry. Although it is certainly worse for your eyes!
Notebooks are a new standard in scientific research and data analysis. They are usually open-source interactive web applications to create and share documents that bring together code (to perform computations), outputs (such as plots, tables, visualizations, etc.), and formatted text (to explain stuff). Pluto is a Julia package that creates such an environment. A Pluto Notebook is a Julia file (with a .jl
) to be run inside a Pluto session.
It is structured in cells where we introduced the contents: either Julia code to be performed or text to be formatted:
Pluto runs the cells interactively within the Notebook, allowing you to see the results of your code immediately, making it great for data exploration and experimentation. Each Notebook is a full-powered Julia environment, where you may use any package available inside the language ecosystem. On the contrary to other similar softwares, Pluto Notebooks are reactive. This means that any changed code takes effect instantly and deleted code leaves no trace. «At any instant, the program state is completely described by the code you see.»
Opening a Pluto Notebook
Please remember that any time you want to run Pluto you first need to run Julia. Once in julia>
mode, run:
import Pluto; Pluto.run()
↩ Enter↩ Enter
1. Getting the Notebook Path
- Go to the folder where your Notebook is saved and copy the folder’s path.
- To obtain this path, press the mouse’s right button on top of that folder, click on
Properties
, and copy the path seen in theLocation
entry.
2. Pasting the Notebook Path into Pluto
- Paste that path into the appropriate box and press:
- add a back-slash \\ (if you use Windows)
- add a forward-slash // (if you use Linux or macOS)
- Once the slash is added, a small window displays the files in that folder.
- Click only once on top of the Pluto Notebook (it should be a file ended in
.jl
) that you want to run and press ↩ Enter↩ Enter
- The Notebook is ready to use when the
Status
panel on the bottom-right of the page stops blinking.
Running a cell and saving a Pluto Notebook
When we apply changes to a Notebook, by creating a new cell or introducing changes to an existing cell, there are two ways to run these changes:
- To run an individual cell:
- Click Shift+↩ EnterShift+↩ Enter
- Click on the small circle as in the figure below:
- Click Shift+↩ EnterShift+↩ Enter
- To run all cells and saving the entire Notebook: Ctrl+SCtrl+S
Exporting a Pluto Notebook
- A Pluto Notebook can be exported in three other formats:
- as a
Julia
file - as a
HTML
file - as a
PDF
file
- as a
- There is a small icon with the export box at the top right-hand side of the monitor
- Then choose the format of your preference