Skip to content

Commit

Permalink
doc : docstrings updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Feb 16, 2024
1 parent dcd7aab commit 16d3ccb
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions gopem/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ def __init__(self, parent=None, width=5, height=4, dpi=100):
Initialize of MatPlotLib canvas for plotter.
:param parent: the QWidget parent
:type parent: QWidget
:param width: the initial width of canvas
:type width: int
:param height: the initial height of canvas
:type height: int
:param dpi: the dpi of the canvas
:type dpi: int
"""
self.fig = Figure(figsize=(width, height), dpi=dpi)
self.axes = self.fig.add_subplot(111)
Expand Down Expand Up @@ -49,16 +53,27 @@ def update_plot(
Update the data and axis range of the canvas.
:param data: a dictionary that contains the data points
:type data: dict
:param x_axis: the ticks on X axis
:type x_axis: str
:param y_axis: the ticks on Y axis
:type y_axis: str
:param color: color name
:type color: str
:param marker : data marker
:type marker: str
:param style: line style
:type style: str
:param x_scale: x-axis scale
:type x_scale: str
:param y_scale: y-axis scale
:type y_scale: str
:param linewidth: plot line width
:type linewidth: float
:param font_title: title font size
:type font_title: int
:param font_axes: axes labels font size
:type font_axes: int
:return: None
"""
self.axes.cla()
Expand Down Expand Up @@ -97,7 +112,9 @@ def save_fig(self, filename, transparent):
Save figure.
:param filename: file name
:type filename: str
:param transparent: transparent flag
:type transparent: bool
:return: None
"""
self.fig.savefig(filename, transparent=transparent)
Expand All @@ -111,7 +128,9 @@ def __init__(self, *args, **kwargs):
Application widget for MPLCanvas class.
:param args: the list of arguments
:type args: list
:param kwargs: the dictionary of keywords
:type kwargs: dict
"""
super().__init__(*args, **kwargs)
layout = QtWidgets.QVBoxLayout(self)
Expand All @@ -136,16 +155,27 @@ def update_plotter_data(
Update the plotter data and axis.
:param data: the dictionary of data
:type data: dict
:param x_axis: the Ticks on X axis
:type x_axis: str
:param y_axis: the Ticks on Y axis
:type y_axis: str
:param color: color name
:type color: str
:param marker : data marker
:type marker: str
:param style: line style
:type style: str
:param x_scale: x-axis scale
:type x_scale: str
:param y_scale: y-axis scale
:type y_scale: str
:param linewidth: plot line width
:type linewidth: float
:param font_title: title font size
:type font_title: int
:param font_axes: axes labels font size
:type font_axes: int
:return: None
"""
if not font_title:
Expand Down

0 comments on commit 16d3ccb

Please sign in to comment.