text
stringlengths
0
828
def get_fmt_widget(self, parent, project):
""""""Get a widget with the different font weights""""""
from psy_simple.widgets.texts import FontWeightWidget
return FontWeightWidget(
parent, self, next(iter(getattr(self, base.key).texts), None),
base)
return LabelWeight(base.key + 'weight')"
1562,"def label_size(base, label_name=None, children=[], parents=[],
dependencies=[]):
""""""
Function that returns a Formatoption class for modifying the fontsite
This function returns a :class:`~psyplot.plotter.Formatoption` instance
that modifies the size of the given `base` formatoption
Parameters
----------
%(label_weight.parameters)s
Returns
-------
Formatoption
The formatoption instance that modifies the fontsize of `base`
See Also
--------
label_weight, label_props, Figtitle, Title""""""
label_name = label_name or base.key
cl_children = children
cl_parents = parents
cl_dependencies = dependencies
class LabelSize(Formatoption):
__doc__ = """"""
Set the size of the %s
Possible types
--------------
%%(fontsizes)s
See Also
--------
%s, %s, %s"""""" % (label_name, base.key, base.key + 'weight',
base.key + 'props')
children = [base.key] + cl_children
parent = [base.key + 'props'] + cl_parents
dependencies = cl_dependencies
group = 'labels'
name = 'Font size of ' + (base.name or base.key)
def update(self, value):
for text in getattr(self, base.key).texts:
text.set_size(value)
def get_fmt_widget(self, parent, project):
""""""Get a widget with the different font weights""""""
from psy_simple.widgets.texts import FontSizeWidget
return FontSizeWidget(
parent, self, next(iter(getattr(self, base.key).texts), None),
base)
return LabelSize(base.key + 'size')"
1563,"def label_props(base, label_name=None, children=[], parents=[],
dependencies=[]):
""""""
Function that returns a Formatoption class for modifying the fontsite
This function returns a :class:`~psyplot.plotter.Formatoption` instance
that modifies the size of the given `base` formatoption
Parameters
----------
%(label_weight.parameters)s
children: list of str
The childrens of the resulting formatoption class (besides the `base`
formatoption, the ``base.key + 'size'`` and ``base.key + 'weight'``
keys, which are included anyway (see :func:`label_size`,
:func:`label_weight`))
parents: list of str
The parents of the resulting formatoption class
Returns
-------
Formatoption
The formatoption instance that modifies the fontsize of `base`
See Also
--------
label_weight, label_props, Figtitle, Title""""""
label_name = label_name or base.key
cl_children = children
cl_parents = parents
cl_dependencies = dependencies
class LabelProps(Formatoption):
__doc__ = """"""