An open API service indexing awesome lists of open source software.

https://github.com/briochemc/juliaproplotexamples

The proplot examples translated to Julia using PyCall.jl and PyPlot.jl.
https://github.com/briochemc/juliaproplotexamples

cartopy examples julia julialang maps matplotlib plots plotting proplot publication publication-quality-plots pycall pyplot python tutorials

Last synced: 3 months ago
JSON representation

The proplot examples translated to Julia using PyCall.jl and PyPlot.jl.

Awesome Lists containing this project

README

        

# Julia ProPlot Examples

Here you will find some (most?) of the [ProPlot](https://proplot.readthedocs.io/en/latest/index.html) examples from the documentation, but translated to Julia using [PyCall.jl](https://github.com/JuliaPy/PyCall.jl).

Note you must install ProPlot first. (And probably some other things.)
* In order to get the colorbars to position/work properly, you need `xarray`. However, note that this causes glitches in LaTex formmatting (i.e. `xlabel=L"$\tau$"` doesn't work anymore.
* In order to address the above, you need to install and use the Julia Package `LaTeXStrings.jl`. This package is inbuilt into `PyPlot.jl` and reexported for use, however here you must call it explicitly via `using LaTeXStrings`

---

Click on the images below to be directed to the julia code that produced it.

## Basics

### Figures and subplots

[

](src/basics/Figures-and-subplots.jl)

### Formatting subplots

[](src/basics/Formatting-subplots.jl)

### Changing rc settings

[](src/basics/Changing-rc-settings.jl)

### Subplot grids

[](src/basics/Subplot-grids.jl)

## Subplots features

### Automatic figure sizing

[
](src/subplots/Automatic-figure-sizing-1.jl)

[


](src/subplots/Automatic-figure-sizing-2.jl)

[


](src/subplots/Automatic-figure-sizing-3.jl)

### Automatic subplot spacing

[](src/subplots/Automatic-subplot-spacing-1.jl)
[](src/subplots/Automatic-subplot-spacing-2.jl)

### Arbitrary physical units

[](src/subplots/Arbitrary-physical-units.jl)

### Subplot numbers and a-b-c labels

[](src/subplots/Subplot-numbers-and-a-b-c-labels.jl)

### Shared and spanning labels

[


](src/subplots/Shared-and-spanning-labels-1.jl)

[
](src/subplots/Shared-and-spanning-labels-2.jl)

## Colorbars and legends

### Axes colorbars and legends

[](src/colorbars_legends/Axes-colorbars-and-legends-1.jl)
[](src/colorbars_legends/Axes-colorbars-and-legends-2.jl)

## Notes

1. Python's 0-based indexing means all the indices are shifted in these Julia examples.

1. The scoping rules are a bit different between Python and Julia, which require some tweaking for the examples to work.

1. You can't format all the subplots at once with `axs.format` AFAIK, so you have to loop through all axes and format each of them.

1. `f, axs = proplot.subplots()` returns a vector of axes, even if you specify multiple columns, so that you need to reshape (and transpose) the `axs` array to get access to the axes in Cartesian coordinates (i.e., as in `axs[i,j]`).

1. I saved the images via `f.savefig("X.svg", transparent=false)` in [figs/](figs/).