I want to dynamically update the scatter plot based on the y-axis data received from a socket connection. I used python matplot lib in interactive mode to do this, but during dynamic updation if i move the window to a different location or minimize the window then the plot updation stops abruptly. Please let me know how to do this?
I have attached a sample dynamic updation code used here and the same problem appears here also, please help. -
import matplotlib.pyplot as plt
-
import random
-
import time
-
items = [25.5,26.7,23.4,22.5,20,13.4,15.6,-12,-16,20]
-
x = [1,2,3,4,5,6,7,8,9,10]
-
-
plt.ion() # Interactive on
-
-
for i in range(1,100):
-
plt.title('graph plotting')
-
plt.ylabel('temperature')
-
plt.xlabel('time')
-
random.shuffle(items)
-
plt.plot(x,items,'ob-')
-
plt.axis([0, 10, -40, 40])
-
plt.draw()
-
#time.sleep(2)
-
plt.clf()
-
plt.close()
2 3484
Hi
If you manage to do this, I'd be very interested! I use matplotlib to make my plots for papers, presentations etc, but also use python to control experiments, and couldn't figure out how to do this exact thing with matplotlib, although I didn't try as hard as I could yet! Still somewhere down there on my to do list!
Anyway, the way I solved it was with gnuplot, and the corresponding gnuplot module for python. I don't really know how to use gnuplot, but you don't really have to, as it's a similar kind of interface to matplotlib.
However, I have a feeling there's a python mega widget (PMW) or something similar that might be better still for this purpose. I vaguely remember seeing something about this in Langtangen's excellent Python Scripting for Computational Scientists. I'll try to remember to look it up when I get back to the office.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Moosebumps |
last post by:
Is there anything that is made to generate web pages which have charts
similar to the yahoo finance stock charts? Not looking to graph stocks
specifically, but anything. I like how you can zoom...
|
by: Andrej Dzerzhinsky |
last post by:
I'm building a scientific app using wxPython to call some C functions
together with a suitable plotting application that will work within a
wxPython frame.
I'd like to plot a spline over several...
|
by: Darren Dale |
last post by:
Hello,
I use Python for interactive data analysis, coming recently from Matlab.
One thing I am missing is a variable browser. The problem with vars() is
that it lists everything loaded in the...
|
by: Brad Jones |
last post by:
<Previously posted in microsoft.public.dotnet.framework.windowsforms>
Hi all. Any suggestions here would be appreciated. Thanks for reading.
I'm primarly a C++ developer but I've been trying to...
|
by: Christophe HELFER |
last post by:
Hi,
I would like to do this in VB Languague.
I have an executable file in DOS mode. This executable returns informations
and display them to the DOS window. Unfortunately, I have to process...
|
by: F.C. |
last post by:
Hello, :)
I'm currently writing a frontend for a console application using VB .net.
I'm using the traditional Process creation to launch it and redirect input
and output to my windows...
|
by: Ilias Lazaridis |
last post by:
IDLE has an output format like this:
<type 'object'>
<type 'type'>
<type 'type'>
How can I customize it to become like that:
<type 'object'>
<type 'type'>
|
by: Boki |
last post by:
Hi All,
I want to force a window ( form, handle ) become foreground, I use:
FindWindow
and
SetForegroundWindow
|
by: =?Utf-8?B?SmFtZXMgV29uZw==?= |
last post by:
Dear all,
I'd like to know if there is any method to minimize command mode window when
a console program is running. In my case, there are several console programs
which run periodically in...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |