Chart module reference

class lognplot.chart.curve.Curve(db, name, color)

A curve is a view onto a signal in the database.

Note that this curve is read only view onto the data.

This is also the point where we assign a color to the data.

class lognplot.chart.chart.Chart(db)

Chart object.

Note that this is only the datatype of the chart. All drawing is performed in a seperate function. This only binds all the axis, traces into a single object.

autoscale_y()

Automatically adjust the Y-axis to fit data in range.

data_summary(timespan=None) → lognplot.tsdb.aggregation.Aggregation

Metrics of all signals in the plot.

fit_metrics_y_axis(metric: lognplot.tsdb.metrics.Metrics)

Adjust Y-axis to fit metrics into view.

fit_timespan_on_x_axis(timespan: lognplot.time.timespan.TimeSpan)

Adjust X-axis to fit timespan in view.

get_region()

Get the current viewed region.

horizontal_pan_absolute(amount)

Pan horizontally by a certain amount.

horizontal_pan_relative(amount)

Pan a percentage of the current axis range.

horizontal_zoom(amount, around)

Zoom in horizontal manner.

set_cursor(value)

Set cursor position onto this chart.

Use None to hide the cursor.

zoom_fit()

Adjust axis to fit all curves.

zoom_to_last(duration)

To to the last duration in view.

class lognplot.chart.axis.Axis

Implement an axis with a minimum and maximum value.

This class can also be used to generate appropriate tick values for the axis.

get_ticks(n_ticks)

Get tick values for this axis.

This function should take care of the following: - tick values are rounded to logical multiples, such as 1, 2 or 0.2 - tick values are returned as tuples of values and the string label.

pan_absolute(step)

Move the axis view by an absolute amount.

pan_relative(amount)

Pan a percentage of the axis range.

set_limits(minimum, maximum)

Set the ends of the axis.

zoom(amount, around=None)

Zoom this axis by a certain amount, optionally around the given value.

lognplot.chart.axis.ceil_to_multiple_of(value, step)

Round the given value to integer multiples of step.