:py:mod:`pylbo.visualisation.spectra.spectrum_multi` ==================================================== .. py:module:: pylbo.visualisation.spectra.spectrum_multi Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: pylbo.visualisation.spectra.spectrum_multi.MultiSpectrumPlot .. py:class:: MultiSpectrumPlot(dataseries, xdata, use_squared_omega, use_real_parts, figsize, custom_figure, **kwargs) Bases: :py:obj:`pylbo.visualisation.spectra.spectrum_figure.SpectrumFigure` Subclass that draws the multispectra. :param dataseries: The dataseries that should be used. :type dataseries: ~pylbo.data_containers.LegolasDataSeries :param xdata: Data to use for the horizontal axis. This can either be a key from the parameters dictionary, or a list/numpy array containing actual data. :type xdata: str, list, numpy.ndarray :param use_squared_omega: If `True`, this will square the eigenvalues when they are plotted on the vertical axis. If `False` (default), either the real or imaginary part of the eigenvalues will be plotted depending on the value of `use_real_parts`. :type use_squared_omega: bool :param use_real_parts: If `True` (default), this will plot the real part of the eigenvalues on the vertical axis. If `False` the imaginary part will be used. :type use_real_parts: bool :param figsize: Optional figure size like the usual matplotlib (x, x) size. :type figsize: tuple :param custom_figure: Optional, in the form (fig, ax). If supplied no new figure will be created but this one will be used instead. `fig` refers to the matplotlib figure and `ax` to a (single) axes instance, meaning that you can pass a subplot as well. :type custom_figure: tuple .. !! processed by numpydoc !! .. py:method:: _validate_xdata(xdata) Validates the xdata passed, does typechecking and necessary casting. If a string is passed, this will request the proper values based on the parameters. :param xdata: The xdata used as x values on the spectrum plot. :type xdata: str, list, numpy.ndarray :returns: **xdata_values** -- The xdata values of proper length and casted to a Numpy array. :rtype: numpy.ndarray .. !! processed by numpydoc !! .. py:method:: _get_ydata() Gets the y data based on the value of :attr:`use_squared_omega`. :returns: **ydata** -- The y data values, either the real or imaginary parts based on :attr:`use_real_parts`. Every element is an array in itself corresponding to the various datasets, hence depending on the gridpoints in every dataset the elements themselves may be of different length. :rtype: numpy.ndarray .. !! processed by numpydoc !! .. py:method:: set_x_scaling(x_scaling) Sets the x scaling, properly adjusted to the dataseries length. :param x_scaling: Values to use for the x-scaling. :type x_scaling: int, float, complex, numpy.ndarray .. !! processed by numpydoc !! .. py:method:: set_y_scaling(y_scaling) Sets the y scaling, properly adjusted to the dataseries length. :param y_scaling: Values to use for the y-scaling. :type y_scaling: int, float, complex, numpy.ndarray .. !! processed by numpydoc !! .. py:method:: add_spectrum() Draw method, creates the spectrum. .. !! processed by numpydoc !! .. py:method:: add_continua(interactive=True) Adds the continua to the plot, either interactive or not. :param interactive: If `True`, makes the legend interactive. :type interactive: bool .. !! processed by numpydoc !! .. py:method:: add_eigenfunctions() Adds the eigenfunctions to the current figure. .. !! processed by numpydoc !!