module: dartlabplot

dartlabplot.hide_negative_numbers(x, pos)

Hide negative numbers on an axis.

class dartlabplot.PosteriorStyle(linestyle: str = '-.', marker: str = 'g+', linecolor: str = 'g')
class dartlabplot.PriorStyle(linestyle: str = '-', marker: str = 'b.', linecolor: str = 'b')
class dartlabplot.ObservationStyle(linestyle: str = '--', marker: str = 'r*', linecolor: str = 'r', markersize: int = 12)
class dartlabplot.DartLabPlot(fig, x_limits)

A class used to create and manage plots for the DartLab project.

This class provides methods to initialize the plot, set x-axis limits, and plot observations with specified styles. It also maintains the state of the current filter selection and clicked points on the plot.

fig

The figure object to be used for plotting.

Type:

matplotlib.figure.Figure

x_limits

A tuple specifying the x-axis limits (min, max).

Type:

tuple

current_filter_selection

The current filter selection, default is ‘EAKF’.

Type:

str

clicked_points

A list to store points clicked on the plot.

Type:

list

mu

The mean value for some distribution, default is 0.

Type:

float

sigma

The standard deviation for some distribution, default is 1.

Type:

float

plot_observation(ax, mu, sigma)

Plots an observation on the given axis with a normal distribution curve.

This method generates a normal distribution curve based on the provided mean (mu) and standard deviation (sigma), and plots it on the specified axis. It also formats the y-axis to hide negative numbers and adds a horizontal line at y=0.

Parameters:
  • ax (matplotlib.axes.Axes) – The axis on which to plot the observation.

  • mu (float) – The mean value of the normal distribution.

  • sigma (float) – The standard deviation of the normal distribution.

Returns:

None

class dartlabplot.TwodEnsemble(fig, ax1, ax2, ax3, ax4, mu, sigma, x_limits)

Extends the DartLabPlot class to create a 2D ensemble interactive plot.

class dartlabplot.OnedEnsemble(fig, ax1, mu, sigma, x_limits, y_limits)

Extends the DartLabPlot class to create a 1D ensemble interactive plot.

class dartlabplot.Lorenz96(fig, ax1, ax2, ax3, ax4)

Extends the DartLabPlot class to create a Lorenz96 interactive plot.