figureflow.figure_panel.FigurePanel.add_scale_bar

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

Add scale bar to image/s.

Parameters:
  • um_per_px – how large is one px in um

  • position – define where the scale bar should be added set as “first_dimension-second dimension” - e.g. “bottom-left” or “top-right”

  • only_in_first_image_of_each – Defines in which dimension only the first image should show scale bar, if None, all images will show scale bar

  • row – row position that the image needs to be in grid to draw scale bar if None, any position in that dimension is allowed can be used to apply different um_per_px settings to different images

  • column – column position that the image needs to be in grid to draw scale bar if None, any position in that dimension is allowed can be used to apply different um_per_px settings to different images

  • lengths_um – list of lengths of scale bar in um, if more than one and more than one scales of images (e.g. with zoom) are there smaller scale bars will be mapped on zooms and larger on non-zooms ideally provide as many

  • color – color of scale bar

  • padding – distance of scale bar from border of image in inches can be single value (then used for both dimension) or can be list of two values, then the first will be for the x and the second for the y axis

  • line_width – line thickness in points

  • always_draw_scale_bar – Whether to draw scale bars in every image even though they are the same scale. Only recommended in very special cases. Normally several scale bars for images with the same scale look like the scales are slightly different.