I'm using plotly to create a bar chart, and have dtick set to 1. It appears correctly in R Studio, like this:
However, when I try to export/publish it, the dticks reset to their default of 0.5 (I've tried exporting to plotly's chart studio and to RPubs -- same result both times):
Does anyone know why this is happening, or have a workaround for it? Here's my code:
fig_negative_2020 = plot_ly(
counts_negative_2020,
x = counts_negative_2020$n,
y = counts_negative_2020$County,
type = 'bar',
color = counts_negative_2020$County)
fig_negative_2020 = layout(fig_negative_2020,
yaxis = list(
dtick = 1,
autorange = 'reversed'
)
)
fig_negative_2020
Thanks for the help!
question from:
https://stackoverflow.com/questions/65893549/axis-ticks-reset-when-publishing-plotly-graph 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…