Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Dynamically plotting data real time quickly

Posted on by 2
I'm currently trying to plot some data that is being generated realtime from a simulation, this portion of code is a simplified version of what I have right now. It works but it is incredibly slow. Are there any tricks or other methods to speed this up.
My simplified code:
import matplotlib.pyplot as pltimport numpy as npimport timeplt.ion()class plotting_class():    def __init__(self):        self.x = []        self.y = []        self.fig, self.ax = plt.subplots()    def plotting(self,i):        # for i in range(20):        self.x.append(i)        self.y.append(5*i)        self.ax.plot(self.x, self.y, 'b')        self.fig.canvas.flush_events()plot_obj = plotting_class()for i in range(20):    plot_obj.plotting(i)    time.sleep(1) # just to see the additions to the plot    if i ==1:        plt.show()
 
  • Martin Dráb Profile Picture
    Martin Dráb 229,275 Most Valuable Professional on at
    Dynamically plotting data real time quickly
    Is this really something related to Microsoft Dynamics 365? If so, which D365 app are you using and what you're doing there with Matplotlib?
     
    I suspect you came to a wrong site by mistake.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans