【发布时间】:2016-07-24 19:55:13
【问题描述】:
我知道scale同时改变了两个参数,但是我想达到在大标记之间连接细线的效果。
我也尝试通过rc{'lines.linewidth' = 1, 'lines.markersize' = 5} 调整大小,但它最终将标记大小和线宽缩放在一起,而不是单独设置它们。从本质上讲,markersize 出于某种原因无效。
编辑:添加情节和代码来显示问题
import seaborn as sns
sns.set(style="whitegrid")
paper_rc = {'lines.linewidth': 1, 'lines.markersize': 10}
sns.set_context("paper", rc = paper_rc)
# Load the example exercise dataset
df = sns.load_dataset("exercise")
# Draw a pointplot to show pulse as a function of three categorical factors
g = sns.factorplot(x="time", y="pulse", hue="kind", col="diet", data=df,
palette="YlGnBu_d", size=6, aspect=.75)
g.despine(left=True)
下面的前两个图形分别使用标记大小 1 和 10 创建。如图所示,它们似乎具有相同的标记大小。最后一张图使用line.linewidth=10 line.markersize=1,同时放大了线宽和标记尺寸。
【问题讨论】:
-
解决方案:link
标签: python matplotlib seaborn