Python Kivy Tutorial – Create Charts

In this Python Kivy tutorial we want to learn how to Create Charts in Kivy, so first of all let’s talk about Kivy and also about installation of Python Kivy.

 

 

What is Kivy?

Kivy is an open-source Python library, we can use Kivy for developing multi-touch applications. It is cross-platform and works on Windows, macOS, Linux, Android, iOS, and Raspberry Pi. Kivy is using for providing natural user interface for different types of applications, particularly those involving touch, gestures and other input methods.

 

 

 

Kivy Installation

For working with example of this tutorial, we need to install these dependencies, you can use pip for the installation.

 

 

 

What is Kivy Garden?

Kivy Garden is an extension of the Kivy framework, and it provides additional widgets and functionalities that are not included in the main Kivy library. It serves as a collection of community contributed widgets and tools that enhance the capabilities of Kivy, Using that you can create more sophisticated and customized applications.

 

 

 

This is the complete code for this article

This code imports required modules, after that we define a custom subclass of FigureCanvasKivyAgg, and also Kivy application class called ScatterChartApp. Inside the application class, we create a BoxLayout and a Matplotlib FigureCanvasKivyAgg widget, then we bind resize event, adds the widget to the layout, and creates a scatter plot using Matplotlib. _resize method handles resizing of the figure. Finally, it runs the Kivy application.

 

 

 

 

Run the complete code and this will be the result

Python Kivy Tutorial - Create Charts
Python Kivy Tutorial – Create Charts

Subscribe and Get Free Video Courses & Articles in your Email

 

Leave a Comment

Share via
Copy link
Powered by Social Snap
×