Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Dynamically plotting data real time quickly

(0) ShareShare
ReportReport
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 230,994 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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,234 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,994 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans