Questions tagged [matplotlib-widget]

matplotlib.widgets provide a simple mechanism for interactive, GUI style plots using matplotlib.

From the matplotlib.widgets page

GUI Neutral widgets

Widgets that are designed to work for any of the GUI backends. All of these widgets require you to predefine matplotlib.axes.Axes instance and pass that as the first argument. Matplotlib doesn’t try to be too smart with respect to layout – you will have to figure out how wide and tall you want your Axes object to be to accommodate your widget.

There are many useful examples including:

215 questions
0
votes
1 answer

Matplotlib Basemap: Removing plotted points

I'm trying to create a button which plots a random point on a matplotlib Basemap. Only problem is that I want the previously plotted points to be removed (i.e. there should only be one point on the map at a given time.) I thought I that after…
0
votes
1 answer

Is there a simple way to get a text-entry field in python?

I am writing a program using matplotlib and would like to have the option for the user to input text or numbers. There currently is not a text-entry widget in matplotlib however (to my knowledge). Is there an easy way to get user text without either…
0
votes
1 answer

Kivy! Loading matplot graph on multiple screens

I i am trying Load an image from the file chooser from a screen and trying to show a the matplotlib graph of the image in an other screen for which i have used Kivy_matplotlib library here is the code import numpy as np import matplotlib.widgets as…
0
votes
1 answer

Plotting datapoints and line at the same time with Matplotlib Widget

I'm trying to plot both a line and data points on the same axis in Matplotlib. When I try to plot the line first, the data points get cleared and the same is true when I try to plot the data points first. Here is the minimal code: from PyQt4 import…
Mike C.
  • 1,761
  • 2
  • 22
  • 46
0
votes
1 answer

Extracting / printing slider value when button is clicked in matplotlib widget (Python 2.7)

I am using the template for the Matplotlib slider widget. I am using this template. How can I alter the script under the "Reset" button to print out the value of the Amp and Freq sliders? import numpy as np import matplotlib.pyplot as plt from…
AaronJPung
  • 1,105
  • 1
  • 19
  • 35
0
votes
0 answers

Save multiple supblots at once using tkinter/FigureCanvasTkAgg

I am trying to develop a GUI which allows me to plot data from subfiles and show it directly in the GUI and save all plotted files in one file. Showing the plots works fine, but when I try to save the whole figure, only the last plotted subfigure is…
0
votes
1 answer

3d interactive graph won't update

I was using this code to create an interactive plot (2d), and it works. import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons fig, ax = plt.subplots() plt.subplots_adjust(left=0.25,…
0
votes
1 answer

How does one refresh subplots created using Python(x,y) QT Designer Matplotlib Widget?

I am using the MPL widget that comes with QT in the Python(x,y) package. I am attempting to refresh or redraw my plot with new data. The method fig.canvas.draw() refreshes the main plot only. The subplots are where my issue lies. The previous…
Mike C.
  • 1,761
  • 2
  • 22
  • 46
0
votes
0 answers

How do I refresh subplots in Matplotlib figure embedded in a PyQt4 Widget

Someone suggested earlier that I call fig.canvas.draw() to refresh my plot with new data. It worked great on the main plot, however I also have subplots included in the chart. The subplots are getting redrawn, however the old subplots, along with…
Mike C.
  • 1,761
  • 2
  • 22
  • 46
0
votes
1 answer

Python(x,y) Matplotlib Widget. Plots fine but how do I get it to refresh?

I'm using the Python(xy) package and QT designer. Python(xy) has a built-in MPL widget for QT which is what I'm using. Works fine for me until I replot: Is there any way to make the current setup (pyplot) redraw? Here's my code: def mpl_plot(self,…
Mike C.
  • 1,761
  • 2
  • 22
  • 46
0
votes
1 answer

Matplotlib multicursor.py for loop-generated subplots

I'm trying to use a multicursor in matplotlib as in the example here. The problem is that my subplots are loop-generated, which means I don't have an ax1, ax2,... But a code is worth a thousands words : t = 0 fig = plt.figure() while t < 16 : …
FKRZ
  • 3
  • 3
0
votes
1 answer

How can I properly plot -dBc values in matplotlib?

So I want to plot the amplitudes of the taps of an equalizer like this: But all of my equalizer tap amplitudes are in -dBc(minus dB carrier). My current code looks like this: self.ui.mplCoeff.canvas.ax.clear() rect =…
ByteMe
  • 3
  • 5
0
votes
1 answer

Replacing time stamp with time counter

So, I have created a tracking system that responds to clicks on an image (using matplotlib). When the user clicks, it returns the coordinates of the point and the current time. (I am exporting this to csv using pandas). The time is included because…
0
votes
1 answer

Python: Memory Error while using MatplotLib

I am facing the below error while plotting graph in matplotlibFile " ", line 1, in File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 2515, in bar ret = ax.bar(left, height, width=width, bottom=bottom, **kwargs) …
ojas
  • 247
  • 1
  • 4
  • 17
0
votes
1 answer

Difficulty with annotate function in Python 2

I'm trying to plot live data on Python from an arduino through the serial port. I found some difficulties with the annotate function: I don't know how to configure it or whether the place where I have put the annotate function is the right place or…
1 2 3
14
15