Bridges-Python 3.5.0-dev1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Properties | List of all members
bridges.line_chart.LineChart Class Reference

Show series of data or functions using a line chart. More...

Public Member Functions

 __init__ (self)
 
 get_data_structure_type (self)
 Get the data type.
 
 set_data_series (self, series_name, x_data, y_data)
 Setter for plot data on X and Y axes.
 
 set_x_data (self, series, x_data)
 Setter for plot data on X axis.
 
 get_x_data (self, series)
 Getter for plot data on X.
 
 set_y_data (self, series, y_data)
 Setter for plot data on Y axis.
 
 get_y_data (self, series)
 Getter for plot data on Y.
 
 convert (self, x_data)
 Convert input data into an array of floats.
 
bool check (self)
 
 get_data_structure_representation (self)
 Get a JSON of the data structure representation.
 

Public Attributes

 yaxis_data
 
 xaxis_data
 

Protected Attributes

 _plot_title
 
 _plot_subtitle
 
 _y_label
 
 _x_label
 
 _mouse_track
 
 _data_label
 
 _logarithmicx
 
 _logarithmicy
 

Properties

 mouse_track = property
 Is mounse tracking on?
 
 data_label = property
 Getter for data label.
 
 logarithmicx = property
 use logarithmic scale on X axis?
 
 logarithmicy = property
 use logarithmic scale on Y axis?
 
 title = property
 Getter for plot title.
 
 sub_title = property
 Getter for plot sub title.
 
 y_label = property
 Getter for plot Y label.
 
 x_label = property
 Getter for plot X label.
 

Detailed Description

Show series of data or functions using a line chart.

Line charts (https://en.wikipedia.org/wiki/Line_chart) are used to represent graphically functions such as f(x) = 3*x+1, or data such as temperature of a liquid on a stove as time passes. A individual function or a set of data is called "series".

A series is represented by two arrays xdata and ydata such that there is a point at (xdata[0], ydata[0]), an other at (xdata[1], ydata[1]), ... One can add a series by passing the two arrays using setDataSeries() or add the arrays individually using setXData() and setYData().

The different series have a label associated with them by default which can be disabled (see toggleSeriesLabel()).

The data is typically shown with axes that use a linear scale. However, the scale can be changed to logarithmic for each axis individually (see toggleLogarithmicX() and toggleLogarithmic()).

The LineChart can have a title (see getTitle() and setTitle()) and a subtitle (see setSubTitle() and getSubTitle()).

Author
Erik Saule, Matthew Mcquaigue
Date
7/23/19

Constructor & Destructor Documentation

◆ __init__()

bridges.line_chart.LineChart.__init__ (   self)

Member Function Documentation

◆ check()

bool bridges.line_chart.LineChart.check (   self)

◆ convert()

bridges.line_chart.LineChart.convert (   self,
  x_data 
)

Convert input data into an array of floats.

Parameters
x_datainput data in a list of values
Returns
A list of floats of the same data

◆ get_data_structure_representation()

bridges.line_chart.LineChart.get_data_structure_representation (   self)

Get a JSON of the data structure representation.

Returns
JSON string of the data structure

◆ get_data_structure_type()

bridges.line_chart.LineChart.get_data_structure_type (   self)

Get the data type.

Returns
name of the data type (used internally)

◆ get_x_data()

bridges.line_chart.LineChart.get_x_data (   self,
  series 
)

Getter for plot data on X.

Returns
dict plot data

◆ get_y_data()

bridges.line_chart.LineChart.get_y_data (   self,
  series 
)

Getter for plot data on Y.

Returns
dict plot data

◆ set_data_series()

bridges.line_chart.LineChart.set_data_series (   self,
  series_name,
  x_data,
  y_data 
)

Setter for plot data on X and Y axes.

Parameters
series_nametitle for the series
x_dataplot data for x axis
y_dataplot data for y axis
Returns
None

◆ set_x_data()

bridges.line_chart.LineChart.set_x_data (   self,
  series,
  x_data 
)

Setter for plot data on X axis.

Parameters
seriesthe name of the series
x_dataplot data
Returns
None

◆ set_y_data()

bridges.line_chart.LineChart.set_y_data (   self,
  series,
  y_data 
)

Setter for plot data on Y axis.

Parameters
seriesseries name
y_dataplot data

Member Data Documentation

◆ _data_label

bridges.line_chart.LineChart._data_label
protected

◆ _logarithmicx

bridges.line_chart.LineChart._logarithmicx
protected

◆ _logarithmicy

bridges.line_chart.LineChart._logarithmicy
protected

◆ _mouse_track

bridges.line_chart.LineChart._mouse_track
protected

◆ _plot_subtitle

bridges.line_chart.LineChart._plot_subtitle
protected

◆ _plot_title

bridges.line_chart.LineChart._plot_title
protected

◆ _x_label

bridges.line_chart.LineChart._x_label
protected

◆ _y_label

bridges.line_chart.LineChart._y_label
protected

◆ xaxis_data

bridges.line_chart.LineChart.xaxis_data

◆ yaxis_data

bridges.line_chart.LineChart.yaxis_data

Property Documentation

◆ data_label

bridges.line_chart.LineChart.data_label = property
static

Getter for data label.

Returns
bool data label flag

◆ logarithmicx

bridges.line_chart.LineChart.logarithmicx = property
static

use logarithmic scale on X axis?

Returns
bool logarthmic scale flag

◆ logarithmicy

bridges.line_chart.LineChart.logarithmicy = property
static

use logarithmic scale on Y axis?

Returns
bool logarthmic scale flag

◆ mouse_track

bridges.line_chart.LineChart.mouse_track = property
static

Is mounse tracking on?

Returns
bool mouse tracking flag

◆ sub_title

bridges.line_chart.LineChart.sub_title = property
static

Getter for plot sub title.

Returns
str plot sub title

◆ title

bridges.line_chart.LineChart.title = property
static

Getter for plot title.

Returns
str plot title

◆ x_label

bridges.line_chart.LineChart.x_label = property
static

Getter for plot X label.

Returns
str plot label

◆ y_label

bridges.line_chart.LineChart.y_label = property
static

Getter for plot Y label.

Returns
str plot label

The documentation for this class was generated from the following file: