grapa.shared.funcgui.funclistgui_graph_axislabels

grapa.shared.funcgui.funclistgui_graph_axislabels(curve: Curve, lookup_x: dict | None = None, lookup_y: dict | None = None, **kwargs) list

To suggests the user appropriate graph axis xlabel and ylabel. Relies on CurveSubClass.AXISLABELS_X and CurveSubClass.AXISLABELS_Y, with form: {“”: [“Radius”, “r”, “m”]}. Key are the corresponding alter keywords. Superseded if the curve instance has attribute Curve.KEY_AXISLABEL_X and/or Curve.KEY_AXISLABEL_Y

Parameters:
  • curve – the Curve selected by the user

  • lookup_x – a dict to lookup new value for x unit, with key alter[0]. Use-case: for example, if unit is “%” instead of “”, or “nF” vs “nF cm-2”

  • lookup_y – a dict to lookup new value for y unit, with key alter[1]

  • kwargs – must contain kwargs “graph”

Returns:

a list containing one FuncGUI element if appropriate, empty otherwise