code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def slide_width(self): """ Width of slides in this presentation, in English Metric Units (EMU). Returns |None| if no slide width is defined. Read/write. """ sldSz = self._element.sldSz if sldSz is None: return None return sldSz.cx
Width of slides in this presentation, in English Metric Units (EMU). Returns |None| if no slide width is defined. Read/write.
slide_width
python
scanny/python-pptx
src/pptx/presentation.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/presentation.py
MIT
def slides(self): """|Slides| object containing the slides in this presentation.""" sldIdLst = self._element.get_or_add_sldIdLst() self.part.rename_slide_parts([cast("CT_SlideId", sldId).rId for sldId in sldIdLst]) return Slides(sldIdLst, self)
|Slides| object containing the slides in this presentation.
slides
python
scanny/python-pptx
src/pptx/presentation.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/presentation.py
MIT
def __eq__(self, other: object) -> bool: """Return |True| if this proxy object refers to the same oxml element as does *other*. ElementProxy objects are value objects and should maintain no mutable local state. Equality for proxy objects is defined as referring to the same XML element, whether ...
Return |True| if this proxy object refers to the same oxml element as does *other*. ElementProxy objects are value objects and should maintain no mutable local state. Equality for proxy objects is defined as referring to the same XML element, whether or not they are the same proxy object instan...
__eq__
python
scanny/python-pptx
src/pptx/shared.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/shared.py
MIT
def clone_master_placeholders(self, notes_master: NotesMaster) -> None: """Selectively add placeholder shape elements from `notes_master`. Selected placeholder shape elements from `notes_master` are added to the shapes collection of this notes slide. Z-order of placeholders is preserved. Certai...
Selectively add placeholder shape elements from `notes_master`. Selected placeholder shape elements from `notes_master` are added to the shapes collection of this notes slide. Z-order of placeholders is preserved. Certain placeholders (header, date, footer) are not cloned.
clone_master_placeholders
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def iter_cloneable_placeholders() -> Iterator[MasterPlaceholder]: """Generate a reference to each cloneable placeholder in `notes_master`. These are the placeholders that should be cloned to a notes slide when the a new notes slide is created. """ cloneable =...
Generate a reference to each cloneable placeholder in `notes_master`. These are the placeholders that should be cloned to a notes slide when the a new notes slide is created.
iter_cloneable_placeholders
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def notes_placeholder(self) -> NotesSlidePlaceholder | None: """the notes placeholder on this notes slide, the shape that contains the actual notes text. Return |None| if no notes placeholder is present; while this is probably uncommon, it can happen if the notes master does not have a body pla...
the notes placeholder on this notes slide, the shape that contains the actual notes text. Return |None| if no notes placeholder is present; while this is probably uncommon, it can happen if the notes master does not have a body placeholder, or if the notes placeholder has been deleted from the ...
notes_placeholder
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def notes_text_frame(self) -> TextFrame | None: """The text frame of the notes placeholder on this notes slide. |None| if there is no notes placeholder. This is a shortcut to accommodate the common case of simply adding "notes" text to the notes "page". """ notes_placeholder = s...
The text frame of the notes placeholder on this notes slide. |None| if there is no notes placeholder. This is a shortcut to accommodate the common case of simply adding "notes" text to the notes "page".
notes_text_frame
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def add_slide(self, slide_layout: SlideLayout) -> Slide: """Return a newly added slide that inherits layout from `slide_layout`.""" rId, slide = self.part.add_slide(slide_layout) slide.shapes.clone_layout_placeholders(slide_layout) self._sldIdLst.add_sldId(rId) return slide
Return a newly added slide that inherits layout from `slide_layout`.
add_slide
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def get(self, slide_id: int, default: Slide | None = None) -> Slide | None: """Return the slide identified by int `slide_id` in this presentation. Returns `default` if not found. """ slide = self.part.get_slide(slide_id) if slide is None: return default retur...
Return the slide identified by int `slide_id` in this presentation. Returns `default` if not found.
get
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def index(self, slide: Slide) -> int: """Map `slide` to its zero-based position in this slide sequence. Raises |ValueError| on *slide* not present. """ for idx, this_slide in enumerate(self): if this_slide == slide: return idx raise ValueError("%s is ...
Map `slide` to its zero-based position in this slide sequence. Raises |ValueError| on *slide* not present.
index
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def iter_cloneable_placeholders(self) -> Iterator[LayoutPlaceholder]: """Generate layout-placeholders on this slide-layout that should be cloned to a new slide. Used when creating a new slide from this slide-layout. """ latent_ph_types = ( PP_PLACEHOLDER.DATE, PP...
Generate layout-placeholders on this slide-layout that should be cloned to a new slide. Used when creating a new slide from this slide-layout.
iter_cloneable_placeholders
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def used_by_slides(self): """Tuple of slide objects based on this slide layout.""" # ---getting Slides collection requires going around the horn a bit--- slides = self.part.package.presentation_part.presentation.slides return tuple(s for s in slides if s.slide_layout == self)
Tuple of slide objects based on this slide layout.
used_by_slides
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def get_by_name(self, name: str, default: SlideLayout | None = None) -> SlideLayout | None: """Return SlideLayout object having `name`, or `default` if not found.""" for slide_layout in self: if slide_layout.name == name: return slide_layout return default
Return SlideLayout object having `name`, or `default` if not found.
get_by_name
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def index(self, slide_layout: SlideLayout) -> int: """Return zero-based index of `slide_layout` in this collection. Raises `ValueError` if `slide_layout` is not present in this collection. """ for idx, this_layout in enumerate(self): if slide_layout == this_layout: ...
Return zero-based index of `slide_layout` in this collection. Raises `ValueError` if `slide_layout` is not present in this collection.
index
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def remove(self, slide_layout: SlideLayout) -> None: """Remove `slide_layout` from the collection. Raises ValueError when `slide_layout` is in use; a slide layout which is the basis for one or more slides cannot be removed. """ # ---raise if layout is in use--- if slide_...
Remove `slide_layout` from the collection. Raises ValueError when `slide_layout` is in use; a slide layout which is the basis for one or more slides cannot be removed.
remove
python
scanny/python-pptx
src/pptx/slide.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/slide.py
MIT
def notify_height_changed(self) -> None: """Called by a row when its height changes. Triggers the graphic frame to recalculate its total height (as the sum of the row heights). """ new_table_height = Emu(sum([row.height for row in self.rows])) self._graphic_frame.height ...
Called by a row when its height changes. Triggers the graphic frame to recalculate its total height (as the sum of the row heights).
notify_height_changed
python
scanny/python-pptx
src/pptx/table.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/table.py
MIT
def notify_width_changed(self) -> None: """Called by a column when its width changes. Triggers the graphic frame to recalculate its total width (as the sum of the column widths). """ new_table_width = Emu(sum([col.width for col in self.columns])) self._graphic_frame.widt...
Called by a column when its width changes. Triggers the graphic frame to recalculate its total width (as the sum of the column widths).
notify_width_changed
python
scanny/python-pptx
src/pptx/table.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/table.py
MIT
def __eq__(self, other: object) -> bool: """|True| if this object proxies the same element as `other`. Equality for proxy objects is defined as referring to the same XML element, whether or not they are the same proxy object instance. """ if not isinstance(other, type(self)): ...
|True| if this object proxies the same element as `other`. Equality for proxy objects is defined as referring to the same XML element, whether or not they are the same proxy object instance.
__eq__
python
scanny/python-pptx
src/pptx/table.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/table.py
MIT
def merge(self, other_cell: _Cell) -> None: """Create merged cell from this cell to `other_cell`. This cell and `other_cell` specify opposite corners of the merged cell range. Either diagonal of the cell region may be specified in either order, e.g. self=bottom-right, other_cell=top-lef...
Create merged cell from this cell to `other_cell`. This cell and `other_cell` specify opposite corners of the merged cell range. Either diagonal of the cell region may be specified in either order, e.g. self=bottom-right, other_cell=top-left, etc. Raises |ValueError| if the specified r...
merge
python
scanny/python-pptx
src/pptx/table.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/table.py
MIT
def split(self) -> None: """Remove merge from this (merge-origin) cell. The merged cell represented by this object will be "unmerged", yielding a separate unmerged cell for each grid cell previously spanned by this merge. Raises |ValueError| when this cell is not a merge-origin cell. T...
Remove merge from this (merge-origin) cell. The merged cell represented by this object will be "unmerged", yielding a separate unmerged cell for each grid cell previously spanned by this merge. Raises |ValueError| when this cell is not a merge-origin cell. Test with `.is_merge_origin` ...
split
python
scanny/python-pptx
src/pptx/table.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/table.py
MIT
def text_frame(self) -> TextFrame: """|TextFrame| containing the text that appears in the cell.""" txBody = self._tc.get_or_add_txBody() return TextFrame(txBody, self)
|TextFrame| containing the text that appears in the cell.
text_frame
python
scanny/python-pptx
src/pptx/table.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/table.py
MIT
def _validate_margin_value(margin_value: Length | None) -> None: """Raise ValueError if `margin_value` is not a positive integer value or |None|.""" if not isinstance(margin_value, int) and margin_value is not None: tmpl = "margin value must be integer or None, got '%s'" raise Ty...
Raise ValueError if `margin_value` is not a positive integer value or |None|.
_validate_margin_value
python
scanny/python-pptx
src/pptx/table.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/table.py
MIT
def __init__(self, fget: Callable[..., _T]) -> None: """*fget* is the decorated method (a "getter" function). A lazyproperty is read-only, so there is only an *fget* function (a regular @property can also have an fset and fdel function). This name was chosen for consistency with Python'...
*fget* is the decorated method (a "getter" function). A lazyproperty is read-only, so there is only an *fget* function (a regular @property can also have an fset and fdel function). This name was chosen for consistency with Python's `property` class which uses this name for the correspo...
__init__
python
scanny/python-pptx
src/pptx/util.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/util.py
MIT
def __get__(self, obj: Any, type: Any = None) -> _T: """Called on each access of 'fget' attribute on class or instance. *self* is this instance of a lazyproperty descriptor "wrapping" the property method it decorates (`fget`, nominally). *obj* is the "host" object instance when the att...
Called on each access of 'fget' attribute on class or instance. *self* is this instance of a lazyproperty descriptor "wrapping" the property method it decorates (`fget`, nominally). *obj* is the "host" object instance when the attribute is accessed from an object instance, e.g. `obj = ...
__get__
python
scanny/python-pptx
src/pptx/util.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/util.py
MIT
def has_major_gridlines(self): """ Read/write boolean value specifying whether this axis has gridlines at its major tick mark locations. Assigning |True| to this property causes major gridlines to be displayed. Assigning |False| causes them to be removed. """ if s...
Read/write boolean value specifying whether this axis has gridlines at its major tick mark locations. Assigning |True| to this property causes major gridlines to be displayed. Assigning |False| causes them to be removed.
has_major_gridlines
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def has_minor_gridlines(self): """ Read/write boolean value specifying whether this axis has gridlines at its minor tick mark locations. Assigning |True| to this property causes minor gridlines to be displayed. Assigning |False| causes them to be removed. """ if s...
Read/write boolean value specifying whether this axis has gridlines at its minor tick mark locations. Assigning |True| to this property causes minor gridlines to be displayed. Assigning |False| causes them to be removed.
has_minor_gridlines
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def has_title(self): """Read/write boolean specifying whether this axis has a title. |True| if this axis has a title, |False| otherwise. Assigning |True| causes an axis title to be added if not already present. Assigning |False| causes any existing title to be deleted. """ ...
Read/write boolean specifying whether this axis has a title. |True| if this axis has a title, |False| otherwise. Assigning |True| causes an axis title to be added if not already present. Assigning |False| causes any existing title to be deleted.
has_title
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def major_tick_mark(self): """ Read/write :ref:`XlTickMark` value specifying the type of major tick mark to display on this axis. """ majorTickMark = self._element.majorTickMark if majorTickMark is None: return XL_TICK_MARK.CROSS return majorTickMark.v...
Read/write :ref:`XlTickMark` value specifying the type of major tick mark to display on this axis.
major_tick_mark
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def minor_tick_mark(self): """ Read/write :ref:`XlTickMark` value specifying the type of minor tick mark for this axis. """ minorTickMark = self._element.minorTickMark if minorTickMark is None: return XL_TICK_MARK.CROSS return minorTickMark.val
Read/write :ref:`XlTickMark` value specifying the type of minor tick mark for this axis.
minor_tick_mark
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def tick_label_position(self): """ Read/write :ref:`XlTickLabelPosition` value specifying where the tick labels for this axis should appear. """ tickLblPos = self._element.tickLblPos if tickLblPos is None: return XL_TICK_LABEL_POSITION.NEXT_TO_AXIS if ...
Read/write :ref:`XlTickLabelPosition` value specifying where the tick labels for this axis should appear.
tick_label_position
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def visible(self): """ Read/write. |True| if axis is visible, |False| otherwise. """ delete = self._element.delete_ if delete is None: return False return False if delete.val else True
Read/write. |True| if axis is visible, |False| otherwise.
visible
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def has_text_frame(self): """Read/write Boolean specifying presence of a text frame. Return |True| if this axis title has a text frame, and |False| otherwise. Assigning |True| causes a text frame to be added if not already present. Assigning |False| causes any existing text frame to ...
Read/write Boolean specifying presence of a text frame. Return |True| if this axis title has a text frame, and |False| otherwise. Assigning |True| causes a text frame to be added if not already present. Assigning |False| causes any existing text frame to be removed along with any text c...
has_text_frame
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def text_frame(self): """|TextFrame| instance for this axis title. Return a |TextFrame| instance allowing read/write access to the text of this axis title and its text formatting properties. Accessing this property is destructive as it adds a new text frame if not already presen...
|TextFrame| instance for this axis title. Return a |TextFrame| instance allowing read/write access to the text of this axis title and its text formatting properties. Accessing this property is destructive as it adds a new text frame if not already present.
text_frame
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def font(self): """ The |Font| object that provides access to the text properties for these tick labels, such as bold, italic, etc. """ defRPr = self._element.defRPr font = Font(defRPr) return font
The |Font| object that provides access to the text properties for these tick labels, such as bold, italic, etc.
font
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def number_format(self): """ Read/write string (e.g. "$#,##0.00") specifying the format for the numbers on this axis. The syntax for these strings is the same as it appears in the PowerPoint or Excel UI. Returns 'General' if no number format has been set. Note that this format st...
Read/write string (e.g. "$#,##0.00") specifying the format for the numbers on this axis. The syntax for these strings is the same as it appears in the PowerPoint or Excel UI. Returns 'General' if no number format has been set. Note that this format string has no effect on render...
number_format
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def number_format_is_linked(self): """ Read/write boolean specifying whether number formatting should be taken from the source spreadsheet rather than the value of :meth:`number_format`. """ numFmt = self._element.numFmt if numFmt is None: return False...
Read/write boolean specifying whether number formatting should be taken from the source spreadsheet rather than the value of :meth:`number_format`.
number_format_is_linked
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def offset(self): """ Read/write int value in range 0-1000 specifying the spacing between the tick mark labels and the axis as a percentange of the default value. 100 if no label offset setting is present. """ lblOffset = self._element.lblOffset if lblOffset is No...
Read/write int value in range 0-1000 specifying the spacing between the tick mark labels and the axis as a percentange of the default value. 100 if no label offset setting is present.
offset
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def crosses(self): """ Member of :ref:`XlAxisCrosses` enumeration specifying the point on this axis where the other axis crosses, such as auto/zero, minimum, or maximum. Returns `XL_AXIS_CROSSES.CUSTOM` when a specific numeric crossing point (e.g. 1.5) is defined. """ ...
Member of :ref:`XlAxisCrosses` enumeration specifying the point on this axis where the other axis crosses, such as auto/zero, minimum, or maximum. Returns `XL_AXIS_CROSSES.CUSTOM` when a specific numeric crossing point (e.g. 1.5) is defined.
crosses
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def crosses_at(self): """ Numeric value on this axis at which the perpendicular axis crosses. Returns |None| if no crossing value is set. """ crossesAt = self._cross_xAx.crossesAt if crossesAt is None: return None return crossesAt.val
Numeric value on this axis at which the perpendicular axis crosses. Returns |None| if no crossing value is set.
crosses_at
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def major_unit(self): """ The float number of units between major tick marks on this value axis. |None| corresponds to the 'Auto' setting in the UI, and specifies the value should be calculated by PowerPoint based on the underlying chart data. """ majorUnit = self...
The float number of units between major tick marks on this value axis. |None| corresponds to the 'Auto' setting in the UI, and specifies the value should be calculated by PowerPoint based on the underlying chart data.
major_unit
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def minor_unit(self): """ The float number of units between minor tick marks on this value axis. |None| corresponds to the 'Auto' setting in the UI, and specifies the value should be calculated by PowerPoint based on the underlying chart data. """ minorUnit = self...
The float number of units between minor tick marks on this value axis. |None| corresponds to the 'Auto' setting in the UI, and specifies the value should be calculated by PowerPoint based on the underlying chart data.
minor_unit
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def _cross_xAx(self): """ The axis element in the same group (primary/secondary) that crosses this axis. """ crossAx_id = self._element.crossAx.val expr = '(../c:catAx | ../c:valAx | ../c:dateAx)/c:axId[@val="%d"]' % crossAx_id cross_axId = self._element.xpath(exp...
The axis element in the same group (primary/secondary) that crosses this axis.
_cross_xAx
python
scanny/python-pptx
src/pptx/chart/axis.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/axis.py
MIT
def depth(self): """ Return an integer representing the number of hierarchical levels in this category collection. Returns 1 for non-hierarchical categories and 0 if no categories are present (generally meaning no series are present). """ cat = self._xChart.cat ...
Return an integer representing the number of hierarchical levels in this category collection. Returns 1 for non-hierarchical categories and 0 if no categories are present (generally meaning no series are present).
depth
python
scanny/python-pptx
src/pptx/chart/category.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/category.py
MIT
def flattened_labels(self): """ Return a sequence of tuples, each containing the flattened hierarchy of category labels for a leaf category. Each tuple is in parent -> child order, e.g. ``('US', 'CA', 'San Francisco')``, with the leaf category appearing last. If this categories c...
Return a sequence of tuples, each containing the flattened hierarchy of category labels for a leaf category. Each tuple is in parent -> child order, e.g. ``('US', 'CA', 'San Francisco')``, with the leaf category appearing last. If this categories collection is non-hierarchical, ...
flattened_labels
python
scanny/python-pptx
src/pptx/chart/category.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/category.py
MIT
def levels(self): """ Return a sequence of |CategoryLevel| objects representing the hierarchy of this category collection. The sequence is empty when the category collection is not hierarchical, that is, contains only leaf-level categories. The levels are ordered from the leaf le...
Return a sequence of |CategoryLevel| objects representing the hierarchy of this category collection. The sequence is empty when the category collection is not hierarchical, that is, contains only leaf-level categories. The levels are ordered from the leaf level to the root level...
levels
python
scanny/python-pptx
src/pptx/chart/category.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/category.py
MIT
def _iter_flattened_categories(self): """ Generate a ``tuple`` object for each leaf category in this collection, containing the leaf category followed by its "parent" categories, e.g. ``('San Francisco', 'CA', 'USA'). Each tuple will be the same length as the number of levels (ex...
Generate a ``tuple`` object for each leaf category in this collection, containing the leaf category followed by its "parent" categories, e.g. ``('San Francisco', 'CA', 'USA'). Each tuple will be the same length as the number of levels (excepting certain edge cases which I believ...
_iter_flattened_categories
python
scanny/python-pptx
src/pptx/chart/category.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/category.py
MIT
def _parentage(self, categories, levels): """ Return a tuple formed by recursively concatenating *categories* with its next ancestor from *levels*. The idx value of the first category in *categories* determines parentage in all levels. The returned sequence is in child -> parent ...
Return a tuple formed by recursively concatenating *categories* with its next ancestor from *levels*. The idx value of the first category in *categories* determines parentage in all levels. The returned sequence is in child -> parent order. A parent category is the Category obje...
_parentage
python
scanny/python-pptx
src/pptx/chart/category.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/category.py
MIT
def __init__(self, pt, idx=None): """ *idx* is a required attribute of a c:pt element, but must be specified when pt is None, as when a "placeholder" category is created to represent a missing c:pt element. """ self._element = self._pt = pt self._idx = idx
*idx* is a required attribute of a c:pt element, but must be specified when pt is None, as when a "placeholder" category is created to represent a missing c:pt element.
__init__
python
scanny/python-pptx
src/pptx/chart/category.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/category.py
MIT
def idx(self): """ Return an integer representing the index reference of this category. For a leaf node, the index identifies the category. For a parent (or other ancestor) category, the index specifies the first leaf category that ancestor encloses. """ if self._...
Return an integer representing the index reference of this category. For a leaf node, the index identifies the category. For a parent (or other ancestor) category, the index specifies the first leaf category that ancestor encloses.
idx
python
scanny/python-pptx
src/pptx/chart/category.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/category.py
MIT
def category_axis(self): """ The category axis of this chart. In the case of an XY or Bubble chart, this is the X axis. Raises |ValueError| if no category axis is defined (as is the case for a pie chart, for example). """ catAx_lst = self._chartSpace.catAx_lst if ...
The category axis of this chart. In the case of an XY or Bubble chart, this is the X axis. Raises |ValueError| if no category axis is defined (as is the case for a pie chart, for example).
category_axis
python
scanny/python-pptx
src/pptx/chart/chart.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/chart.py
MIT
def chart_style(self): """ Read/write integer index of chart style used to format this chart. Range is from 1 to 48. Value is |None| if no explicit style has been assigned, in which case the default chart style is used. Assigning |None| causes any explicit setting to be removed. ...
Read/write integer index of chart style used to format this chart. Range is from 1 to 48. Value is |None| if no explicit style has been assigned, in which case the default chart style is used. Assigning |None| causes any explicit setting to be removed. The integer index correspo...
chart_style
python
scanny/python-pptx
src/pptx/chart/chart.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/chart.py
MIT
def has_title(self): """Read/write boolean, specifying whether this chart has a title. Assigning |True| causes a title to be added if not already present. Assigning |False| removes any existing title along with its text and settings. """ title = self._chartSpace.chart.ti...
Read/write boolean, specifying whether this chart has a title. Assigning |True| causes a title to be added if not already present. Assigning |False| removes any existing title along with its text and settings.
has_title
python
scanny/python-pptx
src/pptx/chart/chart.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/chart.py
MIT
def legend(self): """ A |Legend| object providing access to the properties of the legend for this chart. """ legend_elm = self._chartSpace.chart.legend if legend_elm is None: return None return Legend(legend_elm)
A |Legend| object providing access to the properties of the legend for this chart.
legend
python
scanny/python-pptx
src/pptx/chart/chart.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/chart.py
MIT
def plots(self): """ The sequence of plots in this chart. A plot, called a *chart group* in the Microsoft API, is a distinct sequence of one or more series depicted in a particular charting type. For example, a chart having a series plotted as a line overlaid on three series plot...
The sequence of plots in this chart. A plot, called a *chart group* in the Microsoft API, is a distinct sequence of one or more series depicted in a particular charting type. For example, a chart having a series plotted as a line overlaid on three series plotted as columns would...
plots
python
scanny/python-pptx
src/pptx/chart/chart.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/chart.py
MIT
def value_axis(self): """ The |ValueAxis| object providing access to properties of the value axis of this chart. Raises |ValueError| if the chart has no value axis. """ valAx_lst = self._chartSpace.valAx_lst if not valAx_lst: raise ValueError("chart ha...
The |ValueAxis| object providing access to properties of the value axis of this chart. Raises |ValueError| if the chart has no value axis.
value_axis
python
scanny/python-pptx
src/pptx/chart/chart.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/chart.py
MIT
def has_text_frame(self): """Read/write Boolean specifying whether this title has a text frame. Return |True| if this chart title has a text frame, and |False| otherwise. Assigning |True| causes a text frame to be added if not already present. Assigning |False| causes any existing text ...
Read/write Boolean specifying whether this title has a text frame. Return |True| if this chart title has a text frame, and |False| otherwise. Assigning |True| causes a text frame to be added if not already present. Assigning |False| causes any existing text frame to be removed along wit...
has_text_frame
python
scanny/python-pptx
src/pptx/chart/chart.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/chart.py
MIT
def text_frame(self): """|TextFrame| instance for this chart title. Return a |TextFrame| instance allowing read/write access to the text of this chart title and its text formatting properties. Accessing this property is destructive in the sense it adds a text frame if one is not...
|TextFrame| instance for this chart title. Return a |TextFrame| instance allowing read/write access to the text of this chart title and its text formatting properties. Accessing this property is destructive in the sense it adds a text frame if one is not present. Use :attr:`has_text_fra...
text_frame
python
scanny/python-pptx
src/pptx/chart/chart.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/chart.py
MIT
def data_point_offset(self, series): """ The total integer number of data points appearing in the series of this chart that are prior to *series* in this sequence. """ count = 0 for this_series in self: if series is this_series: return count ...
The total integer number of data points appearing in the series of this chart that are prior to *series* in this sequence.
data_point_offset
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def series_index(self, series): """ Return the integer index of *series* in this sequence. """ for idx, s in enumerate(self): if series is s: return idx raise ValueError("series not in chart data object")
Return the integer index of *series* in this sequence.
series_index
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def number_format(self): """ The formatting template string that determines how a number in this series is formatted, both in the chart and in the Excel spreadsheet; for example '#,##0.0'. If not specified for this series, it is inherited from the parent chart data object. ...
The formatting template string that determines how a number in this series is formatted, both in the chart and in the Excel spreadsheet; for example '#,##0.0'. If not specified for this series, it is inherited from the parent chart data object.
number_format
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def number_format(self): """ The formatting template string that determines how the value of this data point is formatted, both in the chart and in the Excel spreadsheet; for example '#,##0.0'. If not specified for this data point, it is inherited from the parent series data obje...
The formatting template string that determines how the value of this data point is formatted, both in the chart and in the Excel spreadsheet; for example '#,##0.0'. If not specified for this data point, it is inherited from the parent series data object.
number_format
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def add_series(self, name, values=(), number_format=None): """ Add a series to this data set entitled *name* and having the data points specified by *values*, an iterable of numeric values. *number_format* specifies how the series values will be displayed, and may be a string, e....
Add a series to this data set entitled *name* and having the data points specified by *values*, an iterable of numeric values. *number_format* specifies how the series values will be displayed, and may be a string, e.g. '#,##0' corresponding to an Excel number format.
add_series
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def categories(self): """|data.Categories| object providing access to category-object hierarchy. Assigning an iterable of category labels (strings, numbers, or dates) replaces the |data.Categories| object with a new one containing a category for each label in the sequence. Crea...
|data.Categories| object providing access to category-object hierarchy. Assigning an iterable of category labels (strings, numbers, or dates) replaces the |data.Categories| object with a new one containing a category for each label in the sequence. Creating a chart from chart data havi...
categories
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def add_category(self, label): """ Return a newly created |data.Category| object having *label* and appended to the end of this category sequence. *label* can be a string, a number, a datetime.date, or datetime.datetime object. All category labels in a chart must be the same type...
Return a newly created |data.Category| object having *label* and appended to the end of this category sequence. *label* can be a string, a number, a datetime.date, or datetime.datetime object. All category labels in a chart must be the same type. All category labels in a chart h...
add_category
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def are_dates(self): """ Return |True| if the first category in this collection has a date label (as opposed to str or numeric). A date label is one of type datetime.date or datetime.datetime. Returns |False| otherwise, including when this category collection is empty. It also re...
Return |True| if the first category in this collection has a date label (as opposed to str or numeric). A date label is one of type datetime.date or datetime.datetime. Returns |False| otherwise, including when this category collection is empty. It also returns False when this ca...
are_dates
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def are_numeric(self): """ Return |True| if the first category in this collection has a numeric label (as opposed to a string label), including if that value is a datetime.date or datetime.datetime object (as those are converted to integers for storage in Excel). Returns |False| ...
Return |True| if the first category in this collection has a numeric label (as opposed to a string label), including if that value is a datetime.date or datetime.datetime object (as those are converted to integers for storage in Excel). Returns |False| otherwise, including when ...
are_numeric
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def depth(self): """ The number of hierarchy levels in this category graph. Returns 0 if it contains no categories. """ categories = self._categories if not categories: return 0 first_depth = categories[0].depth for category in categories[1:]: ...
The number of hierarchy levels in this category graph. Returns 0 if it contains no categories.
depth
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def index(self, category): """ The offset of *category* in the overall sequence of leaf categories. A non-leaf category gets the index of its first sub-category. """ index = 0 for this_category in self._categories: if category is this_category: ...
The offset of *category* in the overall sequence of leaf categories. A non-leaf category gets the index of its first sub-category.
index
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def levels(self): """ A generator of (idx, label) sequences representing the category hierarchy from the bottom up. The first level contains all leaf categories, and each subsequent is the next level up. """ def levels(categories): # yield all lower levels ...
A generator of (idx, label) sequences representing the category hierarchy from the bottom up. The first level contains all leaf categories, and each subsequent is the next level up.
levels
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def number_format(self): """ Read/write. Return a string representing the number format used in Excel to format these category values, e.g. '0.0' or 'mm/dd/yyyy'. This string is only relevant when the categories are numeric or date type, although it returns 'General' without erro...
Read/write. Return a string representing the number format used in Excel to format these category values, e.g. '0.0' or 'mm/dd/yyyy'. This string is only relevant when the categories are numeric or date type, although it returns 'General' without error when the categories are st...
number_format
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def add_sub_category(self, label): """ Return a newly created |data.Category| object having *label* and appended to the end of the sub-category sequence for this category. """ category = Category(label, self) self._sub_categories.append(category) return category
Return a newly created |data.Category| object having *label* and appended to the end of the sub-category sequence for this category.
add_sub_category
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def depth(self): """ The number of hierarchy levels rooted at this category node. Returns 1 if this category has no sub-categories. """ sub_categories = self._sub_categories if not sub_categories: return 1 first_depth = sub_categories[0].depth ...
The number of hierarchy levels rooted at this category node. Returns 1 if this category has no sub-categories.
depth
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def index(self, sub_category): """ The offset of *sub_category* in the overall sequence of leaf categories. """ index = self._parent.index(self) for this_sub_category in self._sub_categories: if sub_category is this_sub_category: return index ...
The offset of *sub_category* in the overall sequence of leaf categories.
index
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def leaf_count(self): """ The number of leaf category nodes under this category. Returns 1 if this category has no sub-categories. """ if not self._sub_categories: return 1 return sum(category.leaf_count for category in self._sub_categories)
The number of leaf category nodes under this category. Returns 1 if this category has no sub-categories.
leaf_count
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def numeric_str_val(self, date_1904=False): """ The string representation of the numeric (or date) label of this category, suitable for use in the XML `c:pt` element for this category. The optional *date_1904* parameter specifies the epoch used for calculating Excel date numbers....
The string representation of the numeric (or date) label of this category, suitable for use in the XML `c:pt` element for this category. The optional *date_1904* parameter specifies the epoch used for calculating Excel date numbers.
numeric_str_val
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def _excel_date_number(self, date_1904): """ Return an integer representing the date label of this category as the number of days since January 1, 1900 (or 1904 if date_1904 is |True|). """ date, label = datetime.date, self._label # -- get date from label in type-...
Return an integer representing the date label of this category as the number of days since January 1, 1900 (or 1904 if date_1904 is |True|).
_excel_date_number
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def add_data_point(self, value, number_format=None): """ Return a CategoryDataPoint object newly created with value *value*, an optional *number_format*, and appended to this sequence. """ data_point = CategoryDataPoint(self, value, number_format) self.append(data_point) ...
Return a CategoryDataPoint object newly created with value *value*, an optional *number_format*, and appended to this sequence.
add_data_point
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def add_series(self, name, number_format=None): """ Return an |XySeriesData| object newly created and added at the end of this sequence, identified by *name* and values formatted with *number_format*. """ series_data = XySeriesData(self, name, number_format) self....
Return an |XySeriesData| object newly created and added at the end of this sequence, identified by *name* and values formatted with *number_format*.
add_series
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def add_series(self, name, number_format=None): """ Return a |BubbleSeriesData| object newly created and added at the end of this sequence, and having series named *name* and values formatted with *number_format*. """ series_data = BubbleSeriesData(self, name, number_form...
Return a |BubbleSeriesData| object newly created and added at the end of this sequence, and having series named *name* and values formatted with *number_format*.
add_series
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def add_data_point(self, x, y, number_format=None): """ Return an XyDataPoint object newly created with values *x* and *y*, and appended to this sequence. """ data_point = XyDataPoint(self, x, y, number_format) self.append(data_point) return data_point
Return an XyDataPoint object newly created with values *x* and *y*, and appended to this sequence.
add_data_point
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def add_data_point(self, x, y, size, number_format=None): """ Append a new BubbleDataPoint object having the values *x*, *y*, and *size*. The optional *number_format* is used to format the Y value. If not provided, the number format is inherited from the series data. """ ...
Append a new BubbleDataPoint object having the values *x*, *y*, and *size*. The optional *number_format* is used to format the Y value. If not provided, the number format is inherited from the series data.
add_data_point
python
scanny/python-pptx
src/pptx/chart/data.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/data.py
MIT
def font(self): """ The |Font| object that provides access to the text properties for these data labels, such as bold, italic, etc. """ defRPr = self._element.defRPr font = Font(defRPr) return font
The |Font| object that provides access to the text properties for these data labels, such as bold, italic, etc.
font
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def number_format(self): """ Read/write string specifying the format for the numbers on this set of data labels. Returns 'General' if no number format has been set. Note that this format string has no effect on rendered data labels when :meth:`number_format_is_linked` is |True|. ...
Read/write string specifying the format for the numbers on this set of data labels. Returns 'General' if no number format has been set. Note that this format string has no effect on rendered data labels when :meth:`number_format_is_linked` is |True|. Assigning a format string to...
number_format
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def number_format_is_linked(self): """ Read/write boolean specifying whether number formatting should be taken from the source spreadsheet rather than the value of :meth:`number_format`. """ numFmt = self._element.numFmt if numFmt is None: return True ...
Read/write boolean specifying whether number formatting should be taken from the source spreadsheet rather than the value of :meth:`number_format`.
number_format_is_linked
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def position(self): """ Read/write :ref:`XlDataLabelPosition` enumeration value specifying the position of the data labels with respect to their data point, or |None| if no position is specified. Assigning |None| causes PowerPoint to choose the default position, which varies by c...
Read/write :ref:`XlDataLabelPosition` enumeration value specifying the position of the data labels with respect to their data point, or |None| if no position is specified. Assigning |None| causes PowerPoint to choose the default position, which varies by chart type.
position
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def font(self): """The |Font| object providing text formatting for this data label. This font object is used to customize the appearance of automatically inserted text, such as the data point value. The font applies to the entire data label. More granular control of the appearance of cu...
The |Font| object providing text formatting for this data label. This font object is used to customize the appearance of automatically inserted text, such as the data point value. The font applies to the entire data label. More granular control of the appearance of custom data label tex...
font
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def has_text_frame(self): """ Return |True| if this data label has a text frame (implying it has custom data label text), and |False| otherwise. Assigning |True| causes a text frame to be added if not already present. Assigning |False| causes any existing text frame to be removed...
Return |True| if this data label has a text frame (implying it has custom data label text), and |False| otherwise. Assigning |True| causes a text frame to be added if not already present. Assigning |False| causes any existing text frame to be removed along with any text containe...
has_text_frame
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def position(self): """ Read/write :ref:`XlDataLabelPosition` member specifying the position of this data label with respect to its data point, or |None| if no position is specified. Assigning |None| causes PowerPoint to choose the default position, which varies by chart type. ...
Read/write :ref:`XlDataLabelPosition` member specifying the position of this data label with respect to its data point, or |None| if no position is specified. Assigning |None| causes PowerPoint to choose the default position, which varies by chart type.
position
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def text_frame(self): """ |TextFrame| instance for this data label, containing the text of the data label and providing access to its text formatting properties. """ rich = self._get_or_add_rich() return TextFrame(rich, self)
|TextFrame| instance for this data label, containing the text of the data label and providing access to its text formatting properties.
text_frame
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def _get_or_add_rich(self): """ Return the `c:rich` element representing the text frame for this data label, newly created with its ancestors if not present. """ dLbl = self._get_or_add_dLbl() # having a c:spPr or c:txPr when a c:tx is present causes the "can't #...
Return the `c:rich` element representing the text frame for this data label, newly created with its ancestors if not present.
_get_or_add_rich
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def _get_or_add_tx_rich(self): """ Return the `c:tx` element for this data label, with its `c:rich` child and descendants, newly created if not yet present. """ dLbl = self._get_or_add_dLbl() # having a c:spPr or c:txPr when a c:tx is present causes the "can't # ...
Return the `c:tx` element for this data label, with its `c:rich` child and descendants, newly created if not yet present.
_get_or_add_tx_rich
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def _remove_tx_rich(self): """ Remove any `c:tx/c:rich` child of the `c:dLbl` element for this data label. Do nothing if that element is not present. """ dLbl = self._dLbl if dLbl is None: return dLbl.remove_tx_rich()
Remove any `c:tx/c:rich` child of the `c:dLbl` element for this data label. Do nothing if that element is not present.
_remove_tx_rich
python
scanny/python-pptx
src/pptx/chart/datalabel.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/datalabel.py
MIT
def font(self): """ The |Font| object that provides access to the text properties for this legend, such as bold, italic, etc. """ defRPr = self._element.defRPr font = Font(defRPr) return font
The |Font| object that provides access to the text properties for this legend, such as bold, italic, etc.
font
python
scanny/python-pptx
src/pptx/chart/legend.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/legend.py
MIT
def include_in_layout(self): """|True| if legend should be located inside plot area. Read/write boolean specifying whether legend should be placed inside the plot area. In many cases this will cause it to be superimposed on the chart itself. Assigning |None| to this property causes any ...
|True| if legend should be located inside plot area. Read/write boolean specifying whether legend should be placed inside the plot area. In many cases this will cause it to be superimposed on the chart itself. Assigning |None| to this property causes any `c:overlay` element to be remove...
include_in_layout
python
scanny/python-pptx
src/pptx/chart/legend.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/legend.py
MIT
def position(self): """ Read/write :ref:`XlLegendPosition` enumeration value specifying the general region of the chart in which to place the legend. """ legendPos = self._element.legendPos if legendPos is None: return XL_LEGEND_POSITION.RIGHT return l...
Read/write :ref:`XlLegendPosition` enumeration value specifying the general region of the chart in which to place the legend.
position
python
scanny/python-pptx
src/pptx/chart/legend.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/legend.py
MIT
def size(self): """ An integer between 2 and 72 inclusive indicating the size of this marker in points. A value of |None| indicates no explicit value is set and the size is inherited from a higher-level setting or the PowerPoint default (which may be 9). Assigning |None| removes ...
An integer between 2 and 72 inclusive indicating the size of this marker in points. A value of |None| indicates no explicit value is set and the size is inherited from a higher-level setting or the PowerPoint default (which may be 9). Assigning |None| removes any explicitly assi...
size
python
scanny/python-pptx
src/pptx/chart/marker.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/marker.py
MIT
def style(self): """ A member of the :ref:`XlMarkerStyle` enumeration indicating the shape of this marker. Returns |None| if no explicit style has been set, which corresponds to the "Automatic" option in the PowerPoint UI. """ marker = self._element.marker if mark...
A member of the :ref:`XlMarkerStyle` enumeration indicating the shape of this marker. Returns |None| if no explicit style has been set, which corresponds to the "Automatic" option in the PowerPoint UI.
style
python
scanny/python-pptx
src/pptx/chart/marker.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/marker.py
MIT
def data_labels(self): """ |DataLabels| instance providing properties and methods on the collection of data labels associated with this plot. """ dLbls = self._element.dLbls if dLbls is None: raise ValueError("plot has no data labels, set has_data_labels = Tru...
|DataLabels| instance providing properties and methods on the collection of data labels associated with this plot.
data_labels
python
scanny/python-pptx
src/pptx/chart/plot.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/plot.py
MIT
def has_data_labels(self, value): """ Add, remove, or leave alone the ``<c:dLbls>`` child element depending on current state and assigned *value*. If *value* is |True| and no ``<c:dLbls>`` element is present, a new default element is added with default child elements and settings...
Add, remove, or leave alone the ``<c:dLbls>`` child element depending on current state and assigned *value*. If *value* is |True| and no ``<c:dLbls>`` element is present, a new default element is added with default child elements and settings. When |False|, any existing dLbls el...
has_data_labels
python
scanny/python-pptx
src/pptx/chart/plot.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/plot.py
MIT
def vary_by_categories(self): """ Read/write boolean value specifying whether to use a different color for each of the points in this plot. Only effective when there is a single series; PowerPoint automatically varies color by series when more than one series is present. ...
Read/write boolean value specifying whether to use a different color for each of the points in this plot. Only effective when there is a single series; PowerPoint automatically varies color by series when more than one series is present.
vary_by_categories
python
scanny/python-pptx
src/pptx/chart/plot.py
https://github.com/scanny/python-pptx/blob/master/src/pptx/chart/plot.py
MIT