DiffractionSimulation.plot(size_factor=1, direct_beam_position=None, in_plane_angle=0, mirrored=False, units='real', show_labels=False, label_offset=(0, 0), label_formatting={}, ax=None, **kwargs)[source]#

A quick-plot function for a simulation of spots

  • size_factor (float, optional) – linear spot size scaling, default to 1

  • direct_beam_position (2-tuple of ints, optional) – The (x,y) coordinate in pixels of the direct beam. Defaults to the center of the image.

  • in_plane_angle (float, optional) – In plane rotation of the pattern in degrees

  • mirrored (bool, optional) – Whether the pattern should be flipped over the x-axis, corresponding to the inverted orientation

  • units (str, optional) – ‘real’ or ‘pixel’, only changes scalebars, falls back on ‘real’, the default

  • show_labels (bool, optional) – draw the miller indices near the spots

  • label_offset (2-tuple, optional) – the relative location of the spot labels. Does nothing if show_labels is False.

  • label_formatting (dict, optional) – keyword arguments passed to ax.text for drawing the labels. Does nothing if show_labels is False.

  • ax (matplotlib Axes, optional) – axes on which to draw the pattern. If None, a new axis is created

  • **kwargs – passed to ax.scatter() method

Return type:



spot size scales with the square root of the intensity.