Closed
Description
I want to use percentage format(retain four decimal) ,When I set the yaxis parameters(tickformat='p'), but there are always some display problems.
This is my code:
import plotly.offline as py
from plotly.graph_objs import Scatter, Layout
import plotly.graph_objs as go
py.init_notebook_mode(connected=True)
trace1=go.Scatter(
name="lenged2",
x=['2018-01','2018-02','2018-03','2018-04','2018-05','2018-06','2018-07','2018-08','2018-09'],
y=[0.1,0.3,0.5,0.4,0.7,0.3,0.4,0.2,0.4,0.5],
)
layout=go.Layout(
showlegend=True,
legend=dict(x=1.05,y=1.1),
xaxis=dict(showticklabels=True),
yaxis=dict(
tickformat='p',
showgrid=False,
))
data=[trace1]
fig=go.Figure(data=data, layout=layout)
py.iplot(fig)
Any help is greatly appreciated.
Metadata
Metadata
Assignees
Labels
No labels