How it works...

Here is the explanation for the preceding code:

  • curv2rect_tr1 = Affine2D().scale(200, 1).rotate_deg(30) is the transformation function, which works as follows:
    • Affine2D is the linear transformation.
    • scale(200,1) specifies the data scale between the x and y axes. This needs to be set based on the data range to be plotted on the x and y axes.
    • rotate_deg(30) specifies that the plot be rotated by 30 degrees counter clockwise.
  • grid_helper1 = floating_axes.GridHelperCurveLinear(curv2rect_tr1, extremes=(0, 13, 0, 1400)) defines the grid lines as follows:
    • curv2rect_tr1 is the transformation function defined earlier.
    • extremes=(0,13,0,1400) defines the lower and upper limits for the x and y axes. Here, the x axis ranges from 0 ...

Get Matplotlib 3.0 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.