columnnames or xticklabels not work for line
hei6775 opened this issue · comments
hei6775 commented
Hello, I am newer in Visdom. I want to change the xticklabels.
a = np.linspace(1,4,4)
vis.line(a,win="line plot", env="MyPlotEnv",
opts=dict(
columnnames = ['2012', '2013', '2014', '2015']
),
)
If I change the columnnames
to xticklabels
, but nothing seems to have changed
But not work. What should I do?
Jack Urbanek commented
I suspect in order to properly use xticklabels
, you'll also need to provide xtickvals
, but I'm not entirely sure. We transform incoming arguments to try to conform to the plotly standard.
hei6775 commented
Yes, you are right. After I tried to add xtickvals
, it works!!
a = np.linspace(1,4,4)
b = np.linspace(0,3,4)
vis.line(X=b, Y=a,win="line plot3", env="MyPlotEnv",
opts=dict(
xtickmin=0,
xtickmax=5,
xtickstep=1,
xtickvals=[1,2,3],
xticklabels= ['2012','2013', '2014'],
),
update="append"
)
Thanks for your response!!