I’m trying to retrieve the range of the x-axis when you zoom in a plotly scatter plot, but when I tried to access it using:
it just returns ‘None’.
This is the code that I am using to create the graph:
# self.plot contains the dataframe passed to the function to be plotted self.plot = df # Creates the plotly plot figure self.fig = self.plot.iplot(asFigure=True,kind='scatter', xTitle='Date', yTitle='Temperature') # Displays the plot iplot(self.fig, show_link=False)
I’m using cufflinks to create the plot from a pandas DataFrame so I don’t explicitly set the layout.xaxis.range to anything. Also I’m using a Jupyter Notebook to display the graph, if that helps at all. So is there any way of getting the range of the x-axis of the current view window of the plot? Thanks in advance!