How to set X axis range on plotly graphs?
10,775
Set the layout
of xaxis
.
y = 1:100
plot_ly(x=~x, y=~y) %>%
layout(
xaxis = list(
range=c(20,40)
)
)
Author by
H.Ji
Updated on June 24, 2022Comments
-
H.Ji almost 2 years
I am using R version of plotly. Here is what I want:
x = 1:100 y = 1:100 plot_ly(x, y)
I want the graph only show where x>20 and x<40, ignoring the other part. How to do this ?
-
Dieter.Wilhelm about 3 yearsIs it possible to set only one range value like in ggplot's xlim(20,NA)?