0

How can I plot a figure in Python like MATLAB with the following features?:

1) I can zoom in and zoom out. 2) I can modify the range for x and y on the figure 3) I can click on the figure to see actual numbers related to each data point

Another question, how can we specify with wath resolution the matplotlib saves the figure?

To the best of my knowledge, MATPLOTLIB does not have that. Anything else?

Albert
  • 389
  • 3
  • 17
  • 1
    https://stackoverflow.com/questions/7908636/possible-to-make-labels-appear-when-hovering-over-a-point-in-matplotlib – Joe Sep 03 '19 at 08:46
  • 1
    https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.savefig.html takes `dpi` and https://matplotlib.org/3.1.0/api/_as_gen/matplotlib.pyplot.figure.html takes `figsize` and `dpi` to control the size of the plot – Joe Sep 03 '19 at 08:48
  • 1
    https://stackoverflow.com/questions/7908636/possible-to-make-labels-appear-when-hovering-over-a-point-in-matplotlib/38377630 – Joe Sep 03 '19 at 08:50

1 Answers1

1

I would recommend looking at plotly.

Plotly allows you to make graphs that can be

1) zoomed in on

2) change the x and y-axis numbers by dragging on the axes (but cant switch from say, log scale to linear scale as easily -- something like this would require an interaction feature)

3) Plotly allows you to display info on cursor-hover

For an example of a plotly plot in use, see this washington post page.

Avi Vajpeyi
  • 568
  • 6
  • 17