小编Dio*_*pra的帖子

将“add_vline”注释文本垂直放置并在垂直线上居中

import plotly as plotly
from plotly.offline import plot
import plotly.express as px

import pandas as pd
import numpy as np

df = pd.DataFrame({'height': [712, 712, 716, 716, 718, np.nan, np.nan, np.nan, np.nan, np.nan],
                           'moisture ': [0.06, 0.19, 0.18, 0.17, 0.18, np.nan, np.nan, np.nan, np.nan, np.nan],
                           'tasks': ['water', None, None, 'prune', None, None, 'position', None, 'prune', None],
                           'weather': [None, 'humid', None, None, 'wet', None, None, None, None, 'hot']}, 
                           index=['2020-01-04', '2020-01-05', '2020-01-06', '2020-01-07', '2020-01-08', '2020-01-09',
                            '2020-01-10', '2020-01-11', '2020-01-12', '2020-01-13'])

df.index.name = 'date' …
Run Code Online (Sandbox Code Playgroud)

python text position legend plotly

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

legend ×1

plotly ×1

position ×1

python ×1

text ×1