WAM2layers / Moisture_tracking_intercomparison

Apache License 2.0
4 stars 0 forks source link

Stacked images #60

Open Peter9192 opened 5 months ago

Peter9192 commented 5 months ago

Showing a 15-panel figure on an (A4) paper is not very convenient. Each individual panel will be very small. It might be better to put such figures in supplementing info, potentially on an interactive web page / dashboard (see #58).

I think one of the main roles of the all-method image is to convey the idea that "we collected data form many methods and can plot them in a consistent way". To this end, we could also stack the panels, a bit like this:

https://blog.i2s.fr/en/hyperspectral-imaging-an-invisible-revolution-in-quality-control-and-non-contactanalysis-with-extended-power/ Imagerie-hyperspectrale

Where in our case the x- and z-axes would be lat/lon, whereas the y-axis is the method/ensemble member. The right panel could be the ensemble mean/std.

I very quickly tried to make something like this in python:

image

This is the corresponding source code:

import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm

X, Y = np.meshgrid(ds.lon, ds.lat)
Z = np.zeros_like(X)

# Plot
fig = plt.figure()
ax = fig.add_subplot(projection="3d")

for n, (name, da) in enumerate(ds.data_vars.items()):
    ax.plot_surface(X, Z+n, Y, facecolors=cm.GnBu(da))