我想更改我的 pptx 演示文稿的标题和正文的字体大小。title_shape.font = Pt(15)我尝试通过和设置它body_shape.font = Pt(10),但不起作用。
这是我的代码:
from pptx import Presentation, util, text
from pptx.util import Cm, Pt
import fnmatch
import os
import contentOf_pptx as contOfPres
# ..............
# Generate presentation
# ..............
prs = Presentation()
#blank_slide_layout = prs.slide_layouts[6] #blank layout, see slide layout in powerpoint
title_only = prs.slide_layouts[5] #title only, see slide layout in powerpoint
# ..............
# set layout
# ..............
bullet_slide_layout = prs.slide_layouts[1]
slide = prs.slides.add_slide(bullet_slide_layout)
shapes = slide.shapes
title_shape = shapes.title …Run Code Online (Sandbox Code Playgroud) 你好,我是 Python 和 Seaborn 的新手。我只想为 Seaborn 联合图设置 x 限制和 y 限制。此外,我想在没有主图上方和右侧分布信息的情况下绘制该图。我怎样才能做到这一点?我正在尝试这样的事情:
import numpy as np
import matplotlib.pyplot as plt from
matplotlib.ticker import NullFormatter
import seaborn as sns
sns.set(style="ticks")
xData = np.random.rand(100,1)*5
yData = np.random.rand(100,1)*10
xlim = [-15 15]
ylim = [-20 20]
g = sns.jointplot(xData, yData, kind="hex", color="b", xlim, ylim)
Run Code Online (Sandbox Code Playgroud)