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
0 answers

How to exclude matplotlib figure from show() call?

I have a class that owns some matplotlib figures, axes, artists, etc. It has functions for manipulating and displaying these that all work fine when working with instances of the class. However, if a user wants to make some separate matplotlib…
astrokeat
  • 78
  • 1
  • 7
0
votes
0 answers

How to make matplotlib button_press_event ignoring clicking on figure buttons? event.inaxes doesn't work, because button is an axis object

Here is the problem. I need to create ''click catcher''. I need to turn on click catching mode by clicking on the button (Mark) and then, when I click on my plot want my program to remember points list, coordinates, etc. What is especially important…
0
votes
1 answer

Bar graph Figure does not get added to the existing tkinter window

I'm making a GUI based Tkinter project, where after the home screen I must open the following window with a figure having a bar graph plotted. Following code is just a part of my project(and a command of one of many buttons in the project// And…
0
votes
1 answer

Reset CheckButtons to original values in matplotlib

I have a couple of sliders, a checkbox with two options that I set to False, and a reset button, as follows: #Slider slider_M = plt.axes(rectM, facecolor=axcolor) svalueM = Slider(slider_M, 'M', s_Mmin, s_Mmax, valinit=s_Minit,…
calmymail
  • 127
  • 8
0
votes
1 answer

matplotlib widget updates the wrong data

I'm making a plot to compare band structure calculations from two different methods. This means plotting multiple lines for each set of data. I want to have a set of widgets that controls each set of data separately. The code below works if I only…
mTesseracted
  • 290
  • 1
  • 10
0
votes
0 answers

Matplotlib widgets: Change axes or figure upon button push; make slideshow

I would like to create a matplotlib widget that changes the data and axes. It would be great to go even farther and change out a set of subplots. I've tried modifying: matplotlib display only one graph of a set of 10 like a slideshow Python…
Colonel
  • 19
  • 4
0
votes
1 answer

how make 2 rectangle selector move in the same times and in the same area

i need to define 2 rectangleselector that moves at the same time and in same region, when i move one another moves at the same time how i can do that ? that is a simple code with 2 plot in 2 panel and 2 rectangle is possible to make the two…
Sarah Tohami
  • 59
  • 1
  • 12
0
votes
1 answer

how update rectangleselector all time when change plot?

i have problem when i open file and i plot it i have my figure with my rectangelselector but when i change and choose other file to plot the new figure i have 2 rectangeleselector i don't know how i can update rectangleselector all time when i…
Tiera Eyek
  • 7
  • 10
0
votes
0 answers

Why is the next histogram not appearing?

I am plotting multiple histograms using buttons(prev, next). On clicking on next, the next histogram does not appear. However, the axes and the title appear. I have tried using plt.hist()instead of ax.hist(), But then the buttons would disappear on…
0
votes
1 answer

selection file in a panel and visualize in another panel wxpython

it's a little complicated but I will try I have a panel or a button 'file' for the choice of a file and the opening of this file is a .nc file (netCDF4) so I would like to visualize it but the problem I would like to see it in one other panel which…
Sarah Tohami
  • 59
  • 1
  • 12
0
votes
1 answer

Custom discrete slider in Python/Django or D3

I'm working on a custom survey app for a small company intranet and would like to design custom sliders. I need to have discrete sliders that can indicate values from 1-5 but would allow you to select your level based on hover over and click…
stagermane
  • 1,003
  • 2
  • 12
  • 29
0
votes
1 answer

Placing animated graph with controlable parameters in a class

import matplotlib.gridspec as gridspec import numpy as np from matplotlib import animation from matplotlib import pyplot as plt from matplotlib.widgets import Slider, CheckButtons PI = np.pi sliderDataList = [{'name': 'Left amplitude', 'min':…
Karlovsky120
  • 6,212
  • 8
  • 41
  • 94
0
votes
0 answers

Creating a new toolbar icon and function with tkinter/matplotlib

I want to add a ruler to a gui created with tkinter and matplotlib. There is already a custom toolbar but it currently only utilizes tools already provided: class CustomToolbar(NavigationToolbar2TkAgg): """ A custom Matplotlib toolbar that allows…
0
votes
0 answers

python matplotlib live graph x axis gets squeezed as more data comes in

''' - Hello Everyone, i have a small issue any help is really appreciated, i have a hardware which captures temperature and humidity i am using python to display live graph problem: after 10 seconds x-axis get flooded with time please see …
0
votes
1 answer

Pick event class wrapped into a function cannot work

Please see the following code: class PickCursor(object): def __init__(self, collection, alpha_other=0.3, tolerance=5): self.collection = collection self.alpha_other = alpha_other self.pts= collection.get_offsets() …
Jiadong
  • 1,822
  • 1
  • 17
  • 37