python-pptx

python-pptx: change border width for pie chart

风格不统一 提交于 2020-08-26 10:10:25
问题 Is it possible to set/edit a Pie chart's border width in python-pptx? I'd image something like this would do the trick? for idx, point in enumerate(chart.series[0].points): point.format.width = Pt(7.25) 回答1: This feature is not yet supported by the python-pptx API, but you can accomplish it by adapting a workaround like this: from pptx.dml.color import RGBColor from pptx.dml.line import LineFormat from pptx.oxml import parse_xml from pptx.oxml.ns import nsdecls from pptx.util import Pt

python-pptx: change border width for pie chart

情到浓时终转凉″ 提交于 2020-08-26 10:07:56
问题 Is it possible to set/edit a Pie chart's border width in python-pptx? I'd image something like this would do the trick? for idx, point in enumerate(chart.series[0].points): point.format.width = Pt(7.25) 回答1: This feature is not yet supported by the python-pptx API, but you can accomplish it by adapting a workaround like this: from pptx.dml.color import RGBColor from pptx.dml.line import LineFormat from pptx.oxml import parse_xml from pptx.oxml.ns import nsdecls from pptx.util import Pt

Python PPTX table.cell color

我是研究僧i 提交于 2020-07-18 18:11:56
问题 So guys here's my problem I would like to fill my table cells with different colors from the default ones... I've checked the docs and made multiple searches on google but couldn´t find something helpful. Here's my code: def create_default_slide(user, ppt, shapes, experience_text, skills): max_height = Inches(ppt.slide_height.inches - kBASE_BOTTOM_INCHES) height = Inches(kBASE_TOP_INCHES) left = Inches(0) top = Inches(.1) shapes.add_picture(kASSETS_DIRECTORY + "ppt_softinsa_header.png", left,

Python PPTX table.cell color

寵の児 提交于 2020-07-18 18:11:25
问题 So guys here's my problem I would like to fill my table cells with different colors from the default ones... I've checked the docs and made multiple searches on google but couldn´t find something helpful. Here's my code: def create_default_slide(user, ppt, shapes, experience_text, skills): max_height = Inches(ppt.slide_height.inches - kBASE_BOTTOM_INCHES) height = Inches(kBASE_TOP_INCHES) left = Inches(0) top = Inches(.1) shapes.add_picture(kASSETS_DIRECTORY + "ppt_softinsa_header.png", left,

Importing python-pptx: ModuleNotFoundError: No module named 'pptx'

允我心安 提交于 2020-07-08 03:18:21
问题 I'm running Python 3.6.6rc1 on macOS Mojave (10.14.1) and I'm trying to import python-pptx Currently, my first line is causing a problem: import python-pptx I deleted that and added this, to no avail. from pptx import Presentation This is my error: ModuleNotFoundError: No module named 'pptx' I have downloaded python-pptx using pip: sudo pip install python-pptx Running pip show python-pptx in the Terminal, I get: Name: python-pptx Version: 0.6.16 Summary: Generate and manipulate Open XML

how to increase the slide size a python generated powerpoint presentation using python-pptx

余生颓废 提交于 2020-07-03 08:14:11
问题 Am trying to fit multiple charts into a python generated slide but I need the size of the slide to be wider. I looked through the available documentation provided which aren't much. 回答1: I was able to resolve this by adjusting the width and height size of the prs prs = Presentation() prs.slide_width = 11887200 prs.slide_height = 6686550 回答2: The default width and height for a slide generated by pptx is 10 inches width and 7.5 inches height. The following code will work to change its default

how to increase the slide size a python generated powerpoint presentation using python-pptx

泄露秘密 提交于 2020-07-03 08:13:10
问题 Am trying to fit multiple charts into a python generated slide but I need the size of the slide to be wider. I looked through the available documentation provided which aren't much. 回答1: I was able to resolve this by adjusting the width and height size of the prs prs = Presentation() prs.slide_width = 11887200 prs.slide_height = 6686550 回答2: The default width and height for a slide generated by pptx is 10 inches width and 7.5 inches height. The following code will work to change its default

How to set font size of chart,axis values and axis titles in python-pptx for xyscatter chart

依然范特西╮ 提交于 2020-06-17 09:37:46
问题 I have very simple xy chart that I made with python-pptx (thanks all from stack overflows who helped me with this). I am struggling with setting font size of XTitle, YTitle, ChartTitle, Series Name and also values on x any axis like (0 20 40 60). The pptx documentation is not very clear to me from pptx import Presentation from pptx.util import Inches,Pt from pptx.enum.chart import XL_CHART_TYPE from pptx.chart.data import XySeriesData,XyChartData prs = Presentation() title_slide_layout = prs