Questions tagged [drawnow]

drawnow is a MATLAB function that flushes the event queue and updates the figure window.

https://nf.nci.org.au/facilities/software/Matlab/techdoc/ref/drawnow.html

18 questions
3
votes
1 answer

GeoPandas plotting - any way to speed things up?

I'm running a gradient descent algorithm on some geo data. The goal is to assign different areas to different clusters to minimize some objective function. I am trying to make a short movie showing how the algorithm progresses. Right now my approach…
benten
  • 1,995
  • 2
  • 23
  • 38
3
votes
1 answer

Draw now and Matplotlib

I am currently working on a project that involves taking analog readings, and mapping them real time on a graph. So to complete this I am running a photo resister through an Arduino Analog port and am reading that data via python 3.4.3. On the…
David Hels
  • 41
  • 1
  • 1
  • 3
2
votes
1 answer

Serial data capture and real time plotting: Drawnow, matplotlib, python

I am new to programming and after a few weeks have made some programs to do simple things; like capture serial data from an arduino and save it to a text file. Now I want to combine a couple things. I want to use python to capture serial data,…
1
vote
0 answers

subplot X axis ticks labels overlap, needs auto-set

I have a code that draws the voltage of a battery in discharge mode vs time in real-time with drawnow but after a while, the time label ticks get too close to each other that no one can read it how to set an automatic scale factor like plt.autoscale…
1
vote
1 answer

matplotlib not responding after a interactive plotting

I was working on a project using Arduino with python, I was plotting real-time sensor data from Arduino using libraries(pyfirmata,matplot,draw now) I am getting the real-time output but after the fixed iteration the figure got not responding. I…
Aju George
  • 123
  • 1
  • 13
1
vote
1 answer

How to speed up a very slow animated plot in MATLAB

I'm trying to create an animated plot but my code is very slow, perhaps the method I'm using is too naive. In the below example, I have 4 subplots each with 3 lines, which I update in a 'time' loop. clc;clear;close all; state =…
user5045
  • 231
  • 1
  • 4
  • 5
1
vote
1 answer

How to animate rectangles

I am trying to make an animation with circles obtained with the rectangle function in Matlab2013. In order to animate the plot, I tried using clf, drawnow and pause, but it does not seem to work. On the other hand, when I work with dots or lines, I…
Fisiquin
  • 69
  • 8
1
vote
1 answer

MatPlotLib Python - RGB values from color sensor used to change color of line point

So I'm working with a TCS3200 color sensor and Arduino Mega 2560 to generate specific RGB values. Then, through the serial cable, I'm sending data to VIDLE for Python, splitting the 3 data points, and storing them in an array (updating the…
1
vote
1 answer

Drawnow on Matlab: It store the figure or store the variable?

May you please help me on a question on DRAWNOW in Matlab? When we using drawnow in Matlab, what happens inside? It stores the figure of the previous-graph, then plot the next-part-of-graph on the same figure? OR it forgets the whole previous-graph…
Thien Nhat
  • 13
  • 1
  • 3
1
vote
0 answers

Is it possible integrate drawnow with gtk?

I am trying to plot a dynamic figure with drawnow inside a gtk window. For example, this one from pylab import arange, plt import numpy as np from drawnow import drawnow plt.ion() # enable interactivity fig=plt.figure() # make a figure def…
Dau
  • 419
  • 1
  • 5
  • 20
0
votes
1 answer

plotting with drawnow in python

I am trying to monitor sensor data in real-time, but the plot shows nothing, below is just an example. can anyone explain to me how come the result is showing nothing? import datetime import random import matplotlib.pyplot as plt from drawnow…
0
votes
1 answer

Updatedline not updating after drawnow on Matlab

I have a code for showing the animation of a pendulum that works fine. Now i want to also plot the pendulums position simultaneously. But it isnt working. Here is my code: % Program 6.3 Animation program for pendulum using IVP solver % Inputs: int =…
0
votes
1 answer

Plotting data dynamically in the Matlab figure

Just to explain what I am facing, I have the following code. ind=(1:10); A=[sin(ind);cos(ind);tan(ind);sec(ind)]'; plot(ind,A(:,1),ind,A(:,2),ind,A(:,3),ind,A(:,4)); the result looks like this: Now, in my real program, the matrix A gets updated…
vipin
  • 1,610
  • 3
  • 16
  • 27
0
votes
0 answers

Python/MatPlotLib: How to add button to plot live data from serial port

I am learning to plot live graphs using matplotlib, and so far have managed to read live data from serial port and plot it. Following is my code:- import serial import numpy import matplotlib.pyplot as plt from drawnow import * import…
Sandrocottus
  • 521
  • 3
  • 8
  • 31
0
votes
0 answers

'module' object has no attribute 'draw_all'

I am trying to use drawnow to plot a graph using python. but there is always an error says that "drawnow has no attribute to draw-all" I'm using python 3 and the latest version of drawnow Thank you for your help! import serial # import Serial…
Estela
  • 1
  • 2
1
2