Psyplot GUI widgets for modifying label formatoptions
This module contains PyQt widgets that can be used to modify label formatoptions (e.g. title, xlabel, titleprops, etc.) in the psyplot GUI.
Classes:
|
A combobox that inserts keys into the formatoption |
|
A widget for modifying the font properties or a label |
|
A widget for modifying the fontsize of a label |
|
A widget for modifying the fontweight of a label |
|
A widget to modify a text label (title, xlabel, etc.) |
Functions:
|
Convert a weight from matplotlib definition to a Qt weight |
- class psy_simple.widgets.texts.DictCombo(attrs, fmt_widget, modulo_style=True)
Bases:
QComboBox
A combobox that inserts keys into the formatoption
Methods:
- insert_bracketed(s)
- insert_modulo(s)
- class psy_simple.widgets.texts.FontPropertiesWidget(parent, fmto, artist=None, base=None)
Bases:
QWidget
A widget for modifying the font properties or a label
Methods:
artist_to_qfont
(artist)Convert a
matplotlib.text.Text
artist to a QFont objectchoose_color
([color])choose_font
([font])Choose a font for the label through a dialog
modify_size
(val)qfont_to_artist_props
(font)refresh
()Refresh the widgets from the current font
Attributes:
The current QFont of the artist
- static artist_to_qfont(artist)
Convert a
matplotlib.text.Text
artist to a QFont object- Parameters:
artist (matplotlib.text.Text) – The text artist, e.g. an axes title
- Returns:
The QFont object
- Return type:
PyQt5.QtGui.QFont
- choose_color(color=None)
- choose_font(font=None)
Choose a font for the label through a dialog
- current_font = None
The current QFont of the artist
- load_properties()
- modify_size(val)
- static qfont_to_artist_props(font)
- refresh()
Refresh the widgets from the current font
- toggle_bold()
- toggle_italic()
- class psy_simple.widgets.texts.FontSizeWidget(parent, fmto, artist=None, base=None)
Bases:
QWidget
A widget for modifying the fontsize of a label
- class psy_simple.widgets.texts.FontWeightWidget(parent, fmto, artist=None, base=None)
Bases:
QWidget
A widget for modifying the fontweight of a label
- class psy_simple.widgets.texts.LabelWidget(parent, fmto, project, properties=True)
Bases:
QWidget
A widget to modify a text label (title, xlabel, etc.)
This widget contains one combobox for the
'labels'
key in thepsyplot.rcParams
dictionary, and a second combobox for the enhanced attributes of the corresponding formatoption object fmto.Additionally, it provides buttons to switch to the formatoption options of the corresponding fontsize, fontweight and fontproperties of this label