nispace.plotting.linewidth_from_data_units

nispace.plotting.linewidth_from_data_units(linewidth, axis, reference='x')[source]

Convert a linewidth in data units to linewidth in points.

Parameters:
  • linewidth (float) – Linewidth in data units of the respective reference-axis

  • axis (matplotlib axis) – The axis which is used to extract the relevant transformation data (data limits and size must not change afterwards)

  • reference (string) – The axis that is taken as a reference for the data width. Possible values: ‘x’ and ‘y’. Defaults to ‘y’.

Returns:

linewidth – Linewidth in points

Return type:

float