diff --git a/docs/vis.rst b/docs/vis.rst index 9d0d3119a74775b35bfeeab53f604d4fe7322fd9..517d646eacc53ae006b1abfc17943f8557675a1b 100644 --- a/docs/vis.rst +++ b/docs/vis.rst @@ -3,6 +3,9 @@ The vis visualization submodule General empyre.vis docu here! +Note that the y-axis of all image plots is flipped in comparison to ``matplotlib.pyplot.imshow``, i.e. that the +origin is `'lower'` in this case instead of `'upper'`. + The plot2d module ----------------- diff --git a/src/empyre/vis/plot2d.py b/src/empyre/vis/plot2d.py index c86ed0f2c86fffbf4e3f5d45b100b3b8fa4cb2a5..2c6b6c34d59a68d14aea24b9582ef8988372ff11 100644 --- a/src/empyre/vis/plot2d.py +++ b/src/empyre/vis/plot2d.py @@ -50,7 +50,9 @@ def imshow(field, axis=None, cmap=None, **kwargs): Notes ----- - Additional kwargs are passed to `matplotlib.pyplot.imshow`. + Additional kwargs are passed to :function:`~matplotlib.pyplot.imshow`. + Note that the y-axis of the plot is flipped in comparison to :function:`~matplotlib.pyplot.imshow`, i.e. that the + origin is `'lower'` in this case instead of `'upper'`. Uses the `empyre-image` stylesheet settings for plotting (and axis creation if none exists, yet). Fields are squeezed before plotting, so non-2D fields work as long as their superfluous dimensions have length 1. @@ -114,6 +116,8 @@ def contour(field, axis=None, **kwargs): Notes ----- Additional kwargs are passed to `matplotlib.pyplot.contour`. + Note that the y-axis of the plot is flipped in comparison to :function:`~matplotlib.pyplot.imshow`, i.e. that the + origin is `'lower'` in this case instead of `'upper'`. Uses the `empyre-image` stylesheet settings for plotting (and axis creation if none exists, yet). Fields are squeezed before plotting, so non-2D fields work as long as their superfluous dimensions have length 1. @@ -164,6 +168,8 @@ def colorvec(field, axis=None, **kwargs): Notes ----- Additional kwargs are passed to `matplotlib.pyplot.imshow`. + Note that the y-axis of the plot is flipped in comparison to :function:`~matplotlib.pyplot.imshow`, i.e. that the + origin is `'lower'` in this case instead of `'upper'`. Uses the `empyre-image` stylesheet settings for plotting (and axis creation if none exists, yet). Fields are squeezed before plotting, so non-2D fields work as long as their superfluous dimensions have length 1. Even though squeezing takes place, `colorvec` "remembers" the original orientation of the slice! This is important