Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
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
    231,893 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,112 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,893 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans