mdciao.flare.add_bezier_curves

mdciao.flare.add_bezier_curves(iax, nodepairs_xy, alphas=None, center=[0, 0], lw=1, bezier_linecolor='k', signed_alphas=None, correct_adjacent_nodes=True)

Generate and plot bezier curves using bezier.Curves as a base class

Parameters
  • iax (Axes) – The axes to draw on

  • nodepairs_xy (iterable of pairs of pairs of floats) – Each item is a pair of pairs [(x1,y1),(x2,y2)] to be connected with bezier curves 1<—>2

  • alphas (iterable of floats, default is None) – The opacity of the curves connecting the pairs in nodepairs_xy. If None is provided, it will be set to 1 for all curves. If provided, must be of len(nodepairs_xy).

  • center (array-like with two floats, default is [0,0]) – The center of the flareplot, in data units

  • lw (int, default is 1) – Linewidth of the curves, in pts

  • bezier_linecolor (matplotlib color, default is “k”) – The color of the curves

  • signed_alphas (dict, default is None) – Provide a color dictionary, e.g. {-1:”b”, +1:”r} to give different colors to positive and negative alpha values. Overwrites whatever is in bezier_linecolor. If None, defaults to bezier_linecolor

  • correct_adjacent_nodes (boolean, default is True) – If two nodes are too close to each other, use a shifted center for the Bezier curve so that it’s visually easier to find. Currently, adjacent is hard-coded to mean “nodes are ten times closer to each other than to the center”

Returns

bz_curves – The bezier.Curves plotted

Return type

list