figureflow.figure_panel.FigurePanel.add_text_on_image

figureflow.figure_panel.FigurePanel.add_text_on_image = <function FigurePanel.add_text_on_image>

Add text on image, also delete all text that was added by function “rescale_font_size”. Therefore should be specifically used for adding text on illustrations. Figure editor GUI will output code that uses this function.

Parameters:
  • texts – list of dicts describing text. Each key of dict is one parameter to axis.text function and each value the corresponding parameter value (x, y and s have to be defined. Other parameters like font_size are optional. See matplotlib docs: “https://matplotlib.org/stable/api/_as_gen/ matplotlib.axes.Axes.text.html”) Changing the font size is not recommended, so that font size is uniform across the entire figure.

  • images

    list of dict or dict

    dict specifies on which images should be drawn

    the key is the category and the value is a list of allowed values

  • show_in_rows – list of ints, In which row to show all texts

  • show_in_columns – list of ints, In which row to show all texts

  • position_in_abs_data_coords – Whether the position of the text is in data coordinates, which means that they will be at the same x,y coordinate position, for each zoom and the overview image - this can be at completely different positions in the axes and may not be in the axes at all (and will therefore not be shown); if False position is as axes fraction and will not be corrected for zoom