Skip to content

plotyy

Plot two data sets on different left and right y-axes.

[ax, h1, h2] = plotyy(x1, y1, x2, y2, ...)

Plots y1 vs x1 against the left y-axis and y2 vs x2 against an overlay right y-axis. Useful when two series share the x-axis but have very different magnitudes. Returns the axes handle and the two graph handles.

plotyy(x, temperature, x, pressure)
  • plot — 2D line / marker plot.
  • yyaxis