如何在Matplotlib中单独更改factorplot中的linewidth和markersize?

如何在Matplotlib中单独更改factorplot中的linewidth和markersize?

为了单独更改factorplot中的linewidth和markersize,我们可以遵循以下步骤 –

  • 设置图形大小并调整子图之间和周围的填充。
  • 从在线存储库加载示例数据集。
  • 使用 factorplot() 方法和 scale 来更改标记大小。
  • 要显示图形,请使用 show() 方法。

示例

import seaborn as sns
from matplotlib import pyplot as plt

plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True

exercise = sns.load_dataset("exercise")

g = sns.factorplot(x="time", y="pulse", hue="kind", data=exercise, ci=95,
                  markers=['o', '*', 'd'],
                  scale=1, height=7.0)

plt.show()
Python

输出

如何在Matplotlib中单独更改factorplot中的linewidth和markersize?

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程

登录

注册