SplinePlot (hwx.gui)¶
Plot for the SplineEditor.
Plots the curve points, an interpolated spline and the derivative.
- Inherits:
Public Methods¶
onDrag (self, event) onModified (self, event) onSelected (self, event) selectPoints (self, indexes) setEventDx (self, event) setInterpolationMethod (self, method) setSpline (self, spline, fit=True)
Method Details¶
-
onDrag(self, event)¶
User is dragging one or more points.
| param event: | Mouse event to get all the selected points in the plot. |
|---|---|
| type event: | MouseEvent |
-
onModified(self, event)¶
Mouse up after a drag.
| param event: | Mouse event to get all the selected points in the plot. |
|---|---|
| type event: | MouseEvent |
-
onSelected(self, event)¶
Points selected in the plot, select the points in the table.
| param event: | Mouse event to get all the selected points in the plot. |
|---|---|
| type event: | MouseEvent |
-
selectPoints(self, indexes)¶
Cells selected from the table, select the points in the plot.
| param indexes: | list of point index to be selected. |
|---|---|
| type indexes: | list |
-
setEventDx(self, event)¶
Limit dx moves so we dont get a bad spline.
spline.xs must increase in value so user can not drag selected points past the unselected points.
| param event: | Mouse event to get all the selected points in the plot. |
|---|---|
| type event: | MouseEvent |
-
setInterpolationMethod(self, method)¶
Sets the interpolation method
| param method: | The interpolation method. Possible choices are “akima”, “linear”, “cubic”, “zero”, “natural”. If it is None, turns off the interpolate and derivative curves. |
|---|---|
| type method: | str |
-
setSpline(self, spline, fit=True)¶
Sets the specified spline in SplinePlot.
| param spline: | The spline containing X and Y values to be set. |
|---|---|
| type spline: | Spline |
| param fit: | Determines whether to fit the plot or not. |
| type fit: | bool |