__init__(self,
xvals=None,
yvals=None,
size=(400,400),
x_label='Residue Sequence',
y_label='Values',
x_range=None,
y_range=None,
color='black',
cvals=None,
bg='white',
title='Results',
fontsize='small',
chart_type='line',
marker='square',
marker_size=9,
shade_color='0.70',
hslider_color='red',
vslider_color='blue',
slider_thickness=3,
slider_pick_tolerance=7,
slider_moved_callback=None)
(Constructor)
|
|
Create a SliderPlot instance.
The plot is returned in a QFrame widget.
- Parameters:
xvals (list) - the x values to plot
yvals (list) - y series to plot, should be the same length as xvals
size (tuple) - (x, y) plot size in pixels
x_label (str) - X-axis label
y_label (str) - Y-axis label
x_range (tuple) - (min, max) values for the X-axis, default is to show all values
y_range (tuple) - (min, max) values for the Y-axis, default is to show all values
color (str) - color for the line plot - this is overridden by cvals if cvals is
given.
cvals (list, tuple or str) - For scatterplots, either a list or tuple of color values for
every point, or a string to set a single color for all points.
Do not use an RGB list or tuple to set a single color for all
points, as that will be interpreted as intended to set individual
colors for 3 (or 4 for RGBA) points. This overrides the value of
color, and is not used for line plots, only scatter plots. If
not given, the value of color is used.
bg (str) - color name for the plot background. See marker:color for some
color names.
title (str) - the title of the plot
chart_type (str) - 'line' if the chart is a line plot (default), 'scatter' if the
chart is scatterplot
shade_color (str) - A matplotlib-recognized color string that the unselected areas
will be shaded
hslider_color (str) - A matplotlib-recognized color string that the horizontal sliders
will be colored
vslider_color (str) - A matplotlib-recognized color string that the vertical sliders
will be colored
slider_thickness (int) - Linewidth of the slider lines
slider_pick_tolerance (int) - Number of pixels the mouse click can be off and still grab the
slider
slider_moved_callback (callable) - Called when one of the slider lines has been moved. The callback
will receive the SlidableLine object that was moved.
marker (tuple) - tuple of (symbol, color, size), only used for scatter plots
-
symbol (1-character str)
-
s - square ('square', rectangle accepted)
-
o - circle ('circle' accepted)
-
^ - triangle up ('arrow' accepted)
-
> - triangle right
-
< - triangle left
-
v - triangle down
-
d - diamond ('diamond' accepted)
-
p - pentagon
-
h - hexagon
-
8 - octagon
-
+ - plus ('cross' accepted)
-
x - x
marker_size (int) - size of the marker
fontsize (int or str) - size in points, or one of the following -
-
xx-small
-
x-small
-
small
-
medium
-
large
-
x-large
-
xx-large
- Returns: QFrame
- The QFrame widget that contains the plot
|