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

Problems with matplotlib blitted cursor embeded in PyQt6 gui

I´m currently developing a software to process spectroscopic data using python. I´m using PyQt6 to design the gui and matplotlib to plot the data. To simplify the data selection I added a cursor widget from matplotlib to the axes. For improved…
0
votes
1 answer

Matplotlib pick_event not working with geopandas dataframe

Here is my Jupyer Notebook source code. But a hard-coded reproducible example is below. (You will need access to the UK.geojson file from my Github or the true source:…
0
votes
0 answers

Slider for date filter in matplotlib

I have number of dates and i want to show only current five dates plots on bar. I required slider for looking the dates other than current five dates. My data is huge and when plotted, it is so messy to see. So I am trying to use X axis slider, so…
0
votes
0 answers

Slider X-axis date range for Matplotlib

I did not get slider for date range. Plot a bar graphs on ranges of dates Datanase details are below SDATETIME FE014APV FE011APV FE014BPV FE011BPV FE014CPV FE011CPV FT001PV FT002PV CCC 2022-10-30 00:55:01.000 0 0.018 0 …
0
votes
0 answers

Live-Updating Graph

So I have the following code: class GooglePage(tk.Frame): def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text="Google (GOOG)", font=LARGEFONT) label.pack(pady=10,padx=10) …
0
votes
0 answers

How to set fix size of RectangleSelector after erelease callback done on Python matplotlib?

I have multiple ax plot with partial code of RectangleSelector as below. from matplotlib.widgets import RectangleSelector import numpy as np import matplotlib.pyplot as plt from functools import partial def select_callback(eclick, erelease,…
joenpc npcsolution
  • 737
  • 4
  • 11
  • 25
0
votes
1 answer

FuncAnimation doesn't display animation

I have code that is running on a different machine. %matplotlib widget import matplotlib.pyplot as plt import matplotlib.animation as animation import numpy as np n = 100 x = np.random.randn(n) def update(curr): if curr == n: …
0
votes
0 answers

Plotting matplotlib data inside PySimpleGUI interface

Currently I'm plotting my data in a figure that shows in a separate window that opens when I click my submit button to plot my data. However, I want to plot the data straight into what I have outlined with a canvas instead. I haven't used python…
0
votes
1 answer

How to combine these two codes in Kivy?

I have two codes and I want to combine Python code into Kivy code. python code: import csv import socket import datetime import time from itertools import zip_longest Time =[] Price = [] fields = ['Time', 'Price'] s =…
Fathi
  • 3
  • 2
0
votes
0 answers

Matplotlib animation: altering data points mid animation

I'm making a graph in python with matlibplot that allows users to view temperature over time in heat map. The user should be able to change between temperature per minute and temperature per hour. The animation works great for only minutes and…
0
votes
1 answer

Kivy Matplotlib cannot be founded

I'm using kivy and matplotlib for visualization of data, these are the libraries: `from kivy.uix.button import Button from kivy.uix.spinner import Spinner import pandas as pd import matplotlib.pyplot as plt from…
0
votes
1 answer

Unclear figure plotting error in matplotlib 3D

I'm trying to better understand 3D plotting using various tutorials online. I tried to recreate one of these online tutorials, this one in particular by running some of the code in my own Jupyter Notebook, however, when I try this I get a suspicious…
0
votes
0 answers

How to make SpanSelector work inside a method in Python?

SpanSelector documentation mentions: "To guarantee that the selector remains responsive, keep a reference to it." Not sure how to incorporate it inside code that I'm writing. My code is below. Would appreciate direct modifications to the code as I'm…
xnax93
  • 1
  • 1
0
votes
0 answers

Make Jupyter Lab Plots Interactive At Will

I'm trying to switch between plotting interactively and statically. I have a +3.0 Jupyter Lab environment that can make plots interactive using the magic command %matplotlib widget However there are times I'd like to plot statically. Restarting the…
0
votes
0 answers

Slider is not updating my diagram correctly

I am trying to plot the biffurcation diagram and its equation. My problem is that I want to put a slider for when I change the rate in the logistic map equation, but I can't seem to understand what I need to code in the update function. import numpy…
Spaghetti
  • 1
  • 1