How to use GLMakie in jupyter notebook?

First, you have to download Julia for your system:

Next you have to add the IJulia package (the Julia backend for Jupyter).

Open Julia (by clicking on the application icon or open a terminal and type julia. This is the Julia REPL. Type ] and then add IJulia. This will link Julia to Jupyter.

Now you should be able to select Julia from the list of kernels.

There is a nice longer tutorial here: 1. Setting up Your Julia Environment — Quantitative Economics with Julia

which also has a section on using Jupyter in Visual Studio Code, which is quite nice. (Using only Jupyter is at the bottom of the tutorial at section 1.10)

Note
You have to use Julia syntax. In your example you are using Python, Numpy, and matplotlib syntax (like np.sin() and plt.figure()). Check out the Makie basic tutorials and examples for how to make plots: Makie homepage

2 Likes