Bridges-Python  3.4.4
Bridges(Python API)
Public Member Functions | Public Attributes | List of all members
bridges.line_chart.LineChart Class Reference

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

Public Member Functions

def __init__ (self)
 
def get_data_structure_type (self)
 Get the data type. More...
 
bool mouse_track (self)
 Is mounse tracking on? More...
 
def mouse_track (self, bool val)
 Set mouse tracking flag. More...
 
def data_label (self)
 Getter for data label. More...
 
def data_label (self, val)
 Setter for data label flag. More...
 
def logarithmicx (self)
 use logarithmic scale on X axis? More...
 
def logarithmicx (self, val)
 Setter for logarithmic scale on X axis. More...
 
def logarithmicy (self)
 use logarithmic scale on Y axis? More...
 
def logarithmicy (self, val)
 Setter for logarithmic scale on Y axis. More...
 
def title (self)
 Getter for plot title. More...
 
def title (self, t)
 Setter for plot title. More...
 
def sub_title (self)
 Getter for plot sub title. More...
 
def sub_title (self, s)
 Setter for plot sub title. More...
 
def y_label (self)
 Getter for plot Y label. More...
 
def y_label (self, label)
 Setter for plot Y label. More...
 
def x_label (self)
 Getter for plot X label. More...
 
def x_label (self, label)
 Setter for plot X label. More...
 
def set_data_series (self, series_name, x_data, y_data)
 Setter for plot data on X and Y axes. More...
 
def set_x_data (self, series, x_data)
 Setter for plot data on X axis. More...
 
def get_x_data (self, series)
 Getter for plot data on X. More...
 
def set_y_data (self, series, y_data)
 Setter for plot data on Y axis. More...
 
def get_y_data (self, series)
 Getter for plot data on Y. More...
 
def convert (self, x_data)
 Convert input data into an array of floats. More...
 
bool check (self)
 
def get_data_structure_representation (self)
 Get a JSON of the data structure representation. More...
 

Public Attributes

 yaxis_data
 
 xaxis_data
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.line_chart.LineChart.__init__ (   self)

Member Function Documentation

◆ check()

bool bridges.line_chart.LineChart.check (   self)

◆ convert()

def 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

◆ data_label() [1/2]

def bridges.line_chart.LineChart.data_label (   self)

Getter for data label.

Returns
bool data label flag

◆ data_label() [2/2]

def bridges.line_chart.LineChart.data_label (   self,
  val 
)

Setter for data label flag.

Parameters
valdata label flag

◆ get_data_structure_representation()

def 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()

def bridges.line_chart.LineChart.get_data_structure_type (   self)

Get the data type.

Returns
name of the data type (used internally)

◆ get_x_data()

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

Getter for plot data on X.

Returns
dict plot data

◆ get_y_data()

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

Getter for plot data on Y.

Returns
dict plot data

◆ logarithmicx() [1/2]

def bridges.line_chart.LineChart.logarithmicx (   self)

use logarithmic scale on X axis?

Returns
bool logarthmic scale flag

◆ logarithmicx() [2/2]

def bridges.line_chart.LineChart.logarithmicx (   self,
  val 
)

Setter for logarithmic scale on X axis.

Parameters
vallogarithmic scale flag
Returns
None

◆ logarithmicy() [1/2]

def bridges.line_chart.LineChart.logarithmicy (   self)

use logarithmic scale on Y axis?

Returns
bool logarthmic scale flag

◆ logarithmicy() [2/2]

def bridges.line_chart.LineChart.logarithmicy (   self,
  val 
)

Setter for logarithmic scale on Y axis.

Parameters
vallogarithmic scale flag
Returns
None

◆ mouse_track() [1/2]

bool bridges.line_chart.LineChart.mouse_track (   self)

Is mounse tracking on?

Returns
bool mouse tracking flag

◆ mouse_track() [2/2]

def bridges.line_chart.LineChart.mouse_track (   self,
bool  val 
)

Set mouse tracking flag.

Parameters
valmouse tracking flag

◆ set_data_series()

def 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()

def 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()

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

Setter for plot data on Y axis.

Parameters
seriesseries name
y_dataplot data

◆ sub_title() [1/2]

def bridges.line_chart.LineChart.sub_title (   self)

Getter for plot sub title.

Returns
str plot sub title

◆ sub_title() [2/2]

def bridges.line_chart.LineChart.sub_title (   self,
  s 
)

Setter for plot sub title.

Parameters
splot sub title
Returns
None

◆ title() [1/2]

def bridges.line_chart.LineChart.title (   self)

Getter for plot title.

Returns
str plot title

◆ title() [2/2]

def bridges.line_chart.LineChart.title (   self,
  t 
)

Setter for plot title.

Parameters
tplot title
Returns
None

◆ x_label() [1/2]

def bridges.line_chart.LineChart.x_label (   self)

Getter for plot X label.

Returns
str plot label

◆ x_label() [2/2]

def bridges.line_chart.LineChart.x_label (   self,
  label 
)

Setter for plot X label.

Parameters
labelplot label
Returns
None

◆ y_label() [1/2]

def bridges.line_chart.LineChart.y_label (   self)

Getter for plot Y label.

Returns
str plot label

◆ y_label() [2/2]

def bridges.line_chart.LineChart.y_label (   self,
  label 
)

Setter for plot Y label.

Parameters
labelplot label
Returns
None

Member Data Documentation

◆ xaxis_data

bridges.line_chart.LineChart.xaxis_data

◆ yaxis_data

bridges.line_chart.LineChart.yaxis_data

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