About 11,800 results
Open links in new tab
  1. python - How to update a plot in matplotlib - Stack Overflow

    Dec 24, 2021 · Instead of replotting, you can just update the data of the plot objects. You'll need to make some changes in your code, but this should be much, much faster than replotting …

  2. Dynamically updating plot in matplotlib - Stack Overflow

    Jun 8, 2012 · import matplotlib.pyplot as plt # generate axes object ax = plt.axes() # set limits plt.xlim(0,10) plt.ylim(0,10) for i in range(10): # add something to axes ax.scatter([i], [i]) …

  3. What is the currently correct way to dynamically update plots in ...

    Dec 28, 2015 · I'm using jupyter-lab and this works for me (adapt it to your case): from IPython.display import clear_output from matplotlib import pyplot as plt import numpy as np …

  4. python matplotlib update scatter plot from a function

    Mar 11, 2017 · # Import Libraries import numpy as np import matplotlib.pyplot as plt from IPython.display import display, clear_output # Create figure and subplot fig = plt.figure() ax = …

  5. How do I plot in real-time in a while loop? - Stack Overflow

    Apr 26, 2018 · This answer requires a-priori knowledge of the x/y data... which is not needed: I prefer 1. don't call plt.axis() but instead create two lists x and y and call plt.plot(x,y) 2. in your …

  6. Continuous 3D plotting (i.e. figure update) - Stack Overflow

    I would like to continuously plot that data as a surface plot to the same window (updating the plot in each iteration) in order to see how it evolves and to check the algorithm. My Idea was to …

  7. python - Automatically Rescale ylim and xlim - Stack Overflow

    May 22, 2023 · I'm plotting data in Python using matplotlib. I am updating the data of the plot based upon some calculations and want the ylim and xlim to be rescaled automatically. …

  8. How to dynamically update a plot in a loop in IPython notebook …

    Jan 26, 2014 · When I just use a print statement to print the data in text format, it works perfectly fine: the output cell just keeps printing data and adding new rows. But when I try to plot the …

  9. python - Updating Matplotlib plot when clicked - Stack Overflow

    Nov 5, 2016 · There's nothing wrong with the way you bind your event. However, you only updated the data set and did not tell matplotlib to do a re-plot with new data. To this end, I …

  10. python - Updating a matplotlib bar graph? - Stack Overflow

    Feb 28, 2012 · Here is an example of how you can animate a bar plot. You call plt.bar only once, save the return value rects, and then call rect.set_height to modify the bar plot. Calling …

Refresh