使用 matplotlib 我可以这样做:
import numpy as np
import matplotlib.pyplot as plt
fig, axs = plt.subplots(1, 2, figsize=(10, 5))
fig.patch.set_facecolor('white')
axs[0].bar(x=[0,1,2], height=[1,2,3])
axs[1].plot(np.random.randint(1, 10, 50))
axs[0].set_title('BARPLOT')
axs[1].set_title('WOLOLO')
Run Code Online (Sandbox Code Playgroud)
对于plotly,我只知道一种设置子图标题的方法——在创建时:
fig = make_subplots(rows=1, cols=2, subplot_titles=('title1', 'title2'))
创建后是否可以设置子图标题?
也许,通过访问Axesmatplotlib 的原始类(我读到基于seaborn的plotly.python,它基于matplotlib)?
还是通过fig.layout?
请使用此代码:
import numpy as np
import plotly.graph_objects as go
from plotly.subplots import make_subplots
fig = make_subplots(rows=1, cols=2)
fig.add_trace(go.Bar(y=[1, 2, 3]), row=1, col=1)
fig.add_trace(go.Scatter(y=np.random.randint(1, 10, 50)), row=1, col=2)
Run Code Online (Sandbox Code Playgroud)
它的文档很少(在contourc功能上):
VN要么是表示要计算的行数的标量,要么是包含行值的向量。如果只需要一个值,设置'VN = [val, val]'; 如果VN省略,则默认为10。
我试过几个例子,它以某种方式影响了我轮廓周围的线条数量。
它是否表示我的函数的斜率有多平滑?
代表什么VN?