SaveFigureOptionsWidget¶
-
class
menpowidgets.options.
SaveFigureOptionsWidget
(renderer=None, file_format='png', dpi=None, orientation='portrait', paper_type='letter', transparent=False, face_colour='white', edge_colour='white', pad_inches=0.0, overwrite=False, style='minimal')[source]¶ Bases:
FlexBox
Creates a widget for saving a figure to file. The widget consists of the following objects from ipywidgets and menpowidgets.tools:
No Object Property (self.) Description 1 Select file_format_select Image format selector 2 FloatText dpi_text DPI selector 3 Dropdown orientation_dropdown Paper orientation 4 Select papertype_select Paper type selector 5 Checkbox transparent_checkbox Transparency setter 6 ColourSelectionWidget
facecolour_widget Face colour selector 7 ColourSelectionWidget
edgecolour_widget Edge colour selector 8 FloatText pad_inches_text Padding in inches 9 Text filename_text Path and filename 10 Checkbox overwrite_checkbox Overwrite flag 11 Latex error_latex Error message area 12 Button save_button Save button 13 VBox path_box Contains 9, 1, 10, 4 14 VBox page_box Contains 3, 2, 8 15 VBox colour_box Contains 6, 7, 5 16 Tab options_tabs Contains 13, 14, 15 17 HBox save_box Contains 12, 11 18 VBox options_box Contains 16, 17 To set the styling of this widget please refer to the
style()
andpredefined_style()
methods.Parameters: - renderer (menpo.visualize.Renderer or subclass or
None
) – The renderer object that was used to render the figure. - file_format (str, optional) – The initial value of the file format.
- dpi (float or
None
, optional) – The initial value of the dpi. IfNone
, then dpi is set to0
. - orientation (
{'portrait', 'landscape'}
, optional) – The initial value of the paper orientation. - paper_type (str, optional) –
The initial value of the paper type. Possible options are:
'letter', 'legal', 'executive', 'ledger', 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'a10', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'b10'
- transparent (bool, optional) – The initial value of the transparency flag.
- face_colour (str or list of float, optional) – The initial value of the face colour.
- edge_colour (str or list of float, optional) – The initial value of the edge colour.
- pad_inches (float, optional) – The initial value of the figure padding in inches.
- overwrite (bool, optional) – The initial value of the overwrite flag.
- style (str (see below), optional) –
Sets a predefined style at the widget. Possible options are:
Style Description 'minimal'
Simple black and white style 'success'
Green-based style 'info'
Blue-based style 'warning'
Yellow-based style 'danger'
Red-based style ''
No style
-
predefined_style
(style)[source]¶ Function that sets a predefined style on the widget.
Parameters: style (str (see below)) – Style options:
Style Description 'minimal'
Simple black and white style 'success'
Green-based style 'info'
Blue-based style 'warning'
Yellow-based style 'danger'
Red-based style ''
No style
-
style
(box_style=None, border_visible=False, border_colour='black', border_style='solid', border_width=1, border_radius=0, padding=0, margin=0, font_family='', font_size=None, font_style='', font_weight='')[source]¶ Function that defines the styling of the widget.
Parameters: - box_style (str or
None
(see below), optional) –Possible widget style options:
'success', 'info', 'warning', 'danger', '', None
- border_visible (bool, optional) – Defines whether to draw the border line around the widget.
- border_colour (str, optional) – The colour of the border around the widget.
- border_style (str, optional) – The line style of the border around the widget.
- border_width (float, optional) – The line width of the border around the widget.
- border_radius (float, optional) – The radius of the border around the widget.
- padding (float, optional) – The padding around the widget.
- margin (float, optional) – The margin around the widget.
- font_family (str (see below), optional) –
The font family to be used. Example options:
'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace', 'helvetica'
- font_size (int, optional) – The font size.
- font_style (str (see below), optional) –
The font style. Example options:
'normal', 'italic', 'oblique'
- font_weight (See Below, optional) –
The font weight. Example options:
'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'
- box_style (str or
- renderer (menpo.visualize.Renderer or subclass or