215 questions
2
votes
2
answers
2k
views
ipywidgets: How to get array input?
I need a widget that takes in an array as input, i.e. something like a hundred sliders (that I don't want to create manually).
How can I achieve this?
I thought the answer would be widgets.Box, but ...
0
votes
0
answers
153
views
Why I cannot use matplotlib and tkinter in a class
I am having problems using matplotlib and tkinter at the same time.
I am trying to create a matplot graphic with radio buttons and embed it in tkinter
Following some examples and documentation over ...
0
votes
1
answer
3k
views
Configuring live graph axis with Tkinter and Matplotlib
I am currently trying to create a live graph on a window using Tkinter and Matplotlib. The data from this graph is continuously appended onto a CSV file and saved like this example row:
06/09/2020 19:...
1
vote
1
answer
48
views
Can I use buttons from one screen to make changes to other screen?
I have a skeleton of an app I want to make. I'm trying to understand how a button from the "values screen" can interfere with the plot in the "direction screen".
Is it even possible ? I couldn't ...
1
vote
1
answer
1k
views
matplotlib.widgets.Slider with histogram
I'm trying to make the interactive histogram but during
update old histogram is not been cleared, as shown in the image below.
)
above plot is generated using following code
from functools import ...
1
vote
1
answer
825
views
matplotlib.widgets.Slider with fill_between
I'm trying to Add the slider in the plot similar to the slider demo example.
I'm plotting fill_between which gives PolyCollection object.
Although I tried with plot too which give Line2D object as ...
4
votes
0
answers
1k
views
matplotlib widgets not working in Jupyterlab 2.1.2
I am running Jupyterlab 2.1.2 on Ubuntu 19.10, since my upgrade to Jupyter lab 2.x the matplotlib widget is not working.
Every time I try to create a figure:
%matplotlib widget
import numpy as np
...
1
vote
0
answers
205
views
Wait for user interaction with a widget in the frontend (INLINE JUPYTERNOTEBOOK)
I'm trying to create a simple GUI that works embedded in a jupyter notebook. The idea is to create a slider widget that updates a plot. Once a user finds the preferred slider position, then he just ...
0
votes
1
answer
57
views
Bargraph condition color option in matplotlib
How can I modify the below code to colour age group 0-20 as orange and 60 above as red and Rest as yellow?
Below is the code:
Import matplotlib. pyplot as plt
dataset. Plot(Kind='bar', x='...
1
vote
1
answer
3k
views
Fix size of the Canvas who contains a Scrollable FigureCanvasTkAgg
I want to ask you if anyone can fix ScrollableTkAggX,
The problem is that the tk.Canvas() or tk.Tk() in the grid position always need to set the gridrowconfigure and columnconfigure, to make the ...
8
votes
0
answers
2k
views
How to resize matplotlib figure to match ipywidgets.Output() size automatically?
I am building a webapp with interactive plots based on Jupyter and Voila.
Inside the notebook I use ipywidgets for handling the interactivity and %matplotlib widget backend so I can update my plots ...
0
votes
1
answer
90
views
Frame containing a scrollable canvas is not taking up the rest of the allotted Tk window
I have written an application that allows users to select a directory and load the info in the directory. The user can then select which aspects of the files to display in a figure. The figure is ...
4
votes
1
answer
2k
views
How to use the Span Selector on a embedded figure of matplotlib widget?
I am working on GUI where I have a system with graphs.
I want to use the spanselector in the graph i do visualize.
I have searched and i can't understand how to use the span selector while calling ...
1
vote
1
answer
899
views
Slider not working and updating values in graph
the following code is not updating the graph as i change the slider. The slider consists of two variables Ao and Au which i wanted to change. Initially Ao is set to be 600 and Au is set to be 800. as ...
1
vote
0
answers
135
views
Removing of white space in Tkinter widget with .tex expression embedded
I'm creating an application that generates mathematical expressions, displays them and allows to check whether student simplified it correctly. I have tried sympy.preview as an approach but it was not ...
0
votes
1
answer
526
views
Making SpanSelector wait for a specific keypress event
I have a script which spawns a data plot with a SpanSelector widget. The widget calls a select_window(vmin, vmax) closure function, which uses the window limits to analyse the chosen data. The ...
1
vote
0
answers
926
views
Creating a matplotlib spectrogram with frequency 'marker' and 'pause' button
I am creating a simple spectrogram in matplotlib
I am wondering how (or where to start, in order to learn) to create a simple cursor tracker that tells me the frequency value at peaks of my graph. ...
1
vote
1
answer
2k
views
Put a slider right under a subplot in matplotlib
I'm trying to put a slider right under the x-axis of a subplot in matplotlib, so that both start and end at the same value. Is there an easy way to do that, meaning that I don't have to find the right ...
1
vote
1
answer
676
views
Make matplotlib button widget actuate when pressed, not when released
I made a simple interactive matplotlib figure that uses buttons to browse plots. A minimal example of one such button is:
import matplotlib.pyplot as plt
from matplotlib.widgets import Button
def ...
0
votes
1
answer
393
views
using non-global variables inside onselect function of SpanSelector object
I am trying to slice and save data (pandas.DataFrame with more than one column) based on features visible in a plot into seperate files each time I select a slice. So far I used the matplotlib ...
0
votes
0
answers
437
views
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 ...
0
votes
0
answers
529
views
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 ...
2
votes
1
answer
338
views
Matplotlib RectangleSelector disappears when new image loaded in wxPython panel
I have an image in a wxPython panel that I want to edit by selecting with Matplotlib RectangleSelector. I have an Image_Viewer class that draws the image. I have an Editor class, where the ...
0
votes
1
answer
665
views
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 ...
0
votes
1
answer
702
views
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', ...
1
vote
1
answer
3k
views
Not able to draw a bounding box with "Width" attribute on the matplotlib's plot?
I am trying to draw a bounding box across text such as :
from matplotlib.pyplot import text
from matplotlib.patches import FancyBboxPatch
import matplotlib.transforms as mtransforms
import numpy as ...
1
vote
0
answers
199
views
adding wedge to basemap in matplotlib
I have a Data frame of 4 columns(point names, latitude, longitude and angles).
I am plotting all the points in basemap w.r.t lat & long values. I have written a function to calculate distance for ...
0
votes
1
answer
169
views
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 ...
0
votes
0
answers
217
views
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 ...
0
votes
1
answer
375
views
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 ...
0
votes
1
answer
279
views
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 ...
0
votes
0
answers
90
views
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 ...
1
vote
0
answers
5k
views
How to remove a matplotlib collection
The Python program below plots a random set of 3 points and circles around them according to the eps slider value.
When changing the slider value, the circles change.
Also, if two circles touch ...
0
votes
1
answer
199
views
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 ...
5
votes
1
answer
6k
views
The python program is not ending when tkinter window is closed
I am working on a project to make Oscilloscope like GUI. Although GUI is not ready yet but I got a problem that the program is not being closed when I am closing the TKinter window. It is still ...
6
votes
2
answers
4k
views
Displaying Radio buttons horizontally in matplotlib
I am using the matplotlib.widgets to create radio buttons in my widgets, the buttons coming are stacked vertically, I would like them to be stacked horizontally.
MVCE:
import matplotlib.pyplot as ...
4
votes
1
answer
8k
views
Pyinstaller onefile Executable Incredibly Huge and Slow
I know I'm not the first to ask, but the other answers on the forum could not help me, so I'm asking. I have a short (181 line) python script that only has the imports
import numpy as np
import ...
0
votes
1
answer
251
views
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 ...
0
votes
1
answer
60
views
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
...
1
vote
1
answer
941
views
Creating a figure with plots, sliders and other widgets arranged with a gridspec layout
I want to create an animated graph which parameters can be controlled with sliders and other widgets. I have to create several similar figures so I want to pack this in some class to be reused with ...
0
votes
0
answers
924
views
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(...
-1
votes
1
answer
793
views
How to range the x-axis from 1 to 20 with 5 difference each, in plot in Python?
This is the result of my code, what changes can be made ?
I want this as the result:
Please Help.
0
votes
0
answers
441
views
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 ...
0
votes
1
answer
29
views
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
...
2
votes
1
answer
907
views
Set logical status of CheckBox in matplotlib without triggering callbacks?
Is there a way to set the logical status of CheckButtons in matplotlib withput triggering onclick() callbacks?
Here is my scenario:
I am displaying a graph with a large number of traces (50+) and ...
0
votes
1
answer
1k
views
How to set the updated value of Slider always in the centre?
Following the Slider Demo of Matplotlib https://matplotlib.org/gallery/widgets/slider_demo.html, I would like to update the Slider ranges, so that every time I change the slider values, those are re-...
4
votes
1
answer
720
views
How to determine which events are connected in Matplotlib?
Is there a function or method in Matplotlib that will tell you
which events have been connected, and perhaps what code is being called by that listener? I've looked all over, no joy. I'm looking ...
4
votes
1
answer
5k
views
Why does my pie chart in Tkinter does not show?
I am building an application which takes input, saves it to a CSV file and now the last basic part is to display a pie chart of the content of the column. The input is supposed to be about books. So, ...
2
votes
1
answer
1k
views
How to draw share xaxis subplot with multiple yaxis with Figure(matplotlib FigureCanvasQTAgg)?
I want to draw a graph that's share xaxis but different yaxis in vertical layer as image below.
I have tried this
import sys
import matplotlib
matplotlib.use("Qt5Agg")
from PyQt5 import QtCore
...
0
votes
1
answer
2k
views
Kivy ScreenManager with Matlibplot to Graph live Data
I am new to Python (using 3.4.2) and Kivy (v1.11.0 dev0) and I am trying to make an app with two screens. In one screen the user can set pump settings and in the next screen the user can see a live ...