jeysonm82 / kivy_matplotlib Goto Github PK
View Code? Open in Web Editor NEWSimple widget to display a Matplotlib figure in kivy. Also a basic toolbar widget to pan and zoom the plot
Simple widget to display a Matplotlib figure in kivy. Also a basic toolbar widget to pan and zoom the plot
Module not found error, I have some experience installing modules but I'm having trouble finding where to start getting this one so I have the MatplotFigure command. Total novice here haha, any help would be appreciated.
Please fix indentation:
kv = """
BoxLayout:
orientation: 'vertical'
MatplotFigure:
id: figure_wgt
size_hint: 1, 0.7
MatplotNavToolbar:
id: navbar_wgt
size_hint: 1, 0.3
figure_widget: figure_wgt
"""
I followed the example that you shared in Github:
https://github.com/jeysonmc/kivy_matplotlib
I added the widget(home, zoom, pan) but I cannot zoom or do anything. Could you please support to check my code.
`import matplotlib as mpl
from kivy.app import App
import numpy as np
from kivy.lang import Builder
from kivy_matplotlib import MatplotFigure, MatplotNavToolbar
from kivy.uix.gridlayout import GridLayout
class testApp(App):
title = "Test Matplotlib"
def build(self):
"remove old graph"
Graph_layout = GridLayout(cols=1, spacing=1, size_hint_y=1,size_hint_x=1, pos_hint= {'right': 1, 'top': 1})
"config data to display in matplot"
fig = mpl.figure.Figure()
fig.gca().plot([1,2,3,4,5,6,3,2,1,4,5,9])
fig.gca().grid(True)
"display graph here"
Configure = MatplotFigure(size_hint=(1,0.8),id='Graph')
Configure.figure = fig
"display widget here"
figure_wgt = MatplotNavToolbar(size_hint=(1,0.2))
figure_wgt.figure_widget=Configure
"add wiget to layout"
Graph_layout.add_widget(Configure)
Graph_layout.add_widget(figure_wgt)
return Graph_layout
testApp().run()`
Thank` you.
How do I make it support multi-screen?
working on image processing stuff where I am using matplotlib and other python libraries to compute and kivy as GUI
but this somehow is not supporting multi-screen functionality
Hey, I'm trying to use your code for a project where I want to have the graph in the same place, but occasionally change the data it's displaying. I cannot figure out how to do it or if it's even possible with this code. Is there some method that updates the data or do I need a completely different approach?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.