Skip to content
Examples of neat Python and Matlab plotting and other tasks & hacks
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
pyplots
tests
.coveragerc
.gitattributes
.gitignore
.travis.yml
CartopyStereoGridLabels.py
Fourier transform Gaussian.ipynb
LICENSE
R2014bAxesMultiColormap.m
README.md
airy_disc_kernel.m
bokeh_demo.py
colormap_white_min.m
colormap_white_min.py
contourImage2.m
contourOverImage.m
contourOverImage.py
contour_demo.py
cwd.m
h5py_demo.py
html_matplotlib.py
masked_array_demo.py
matplotlib_3d.py
matplotlib_add_font.py
oct2py_class.m
oct2py_class.py
octave_fonts.m
pcolormesh_NaN.py
polar_axes_with_image.py
polar_plot_matplotlib.py
setup.cfg
setup.py
subplots_demo.py
sunriseSunset.py
test_airy_disc_kernel.m
title_gitrev.py
widgets_menu.py
widgets_slider_radio.py
xarray_matplotlib.py

README.md

image image

Python and Matlab plotting examples

Examples of neat Python and Matlab / GNU Octave plotting and other tasks

File Description:

  • contourImage2.m: hack to work around Matlab R2014b/R2015a removal of contour(), contourf() and contour3() handle graphics children that formerly could be used to move contours into a 3-D plot. This workaround first plots the image at z=0, and the contour at z=0, then flattens the figure to an image and resizes to the original data, allowing the new pcolor joint plot to be arbitrarily placed in 3-D.
  • R2014bAxesMultiColormap.m: showing the new capability of Matlab R2014b/R2015a to have independent colormaps and colorbars -- freezeColor from Matlab Central is NOT necessary as with earlier versions of Matlab.
  • title_gitrev.py: label title in corner with git revision
  • widgets_gui_matplotlib.py: How to make interactiave, backend-agnostics Matplotlib GUIs
  • colormap_white_min.*: Matlab and Python examples of plots with white zero value and dark maximum value.

Oct2Py

Oct2Py allows running Matlab code from Python, transparently. test_oct2py.py demos this for FIR filter design and Savitsky Golay filtering. Of course, non-built-in functions can be used as well.

NOTE: as of summer 2018, use oct2py==3.9.0 as Oct2Py 4.0.7 is broken.

Other neat tricks

You can’t perform that action at this time.