How to Create Scatter Chart with Python Kivy

In this Python Kivy article we want to learn about How to Create Scatter Chart with Python Kivy, Python Kivy is powerful  framework for creating user interfaces in Python. it is open source and can be used for developing applications for desktops, mobile devices and web. 

 

 

How to Create Scatter Chart with Python Kivy

First of all we need to install our required libraries 

 

 

Once we have installed required libraries, we need to import them in our Python code. we want to use Kivy for creating user interface and Matplotlib for creating the Scatter Chart.

 

 

After that we need to create the user interface using Kivy. we will create BoxLayout and added Matplotlib FigureCanvasKivyAgg widget to it.

 

 

And finally we need to create Scatter Chart using Matplotlib. we want to use a simple example to create Scatter Chart that shows the relationship between height and weight for a group of people.

 

 

Now we can run our application by creating an instance of the ScatterChartApp class and calling its run method.

 

 

 

This is the complete code for this article

When you run this code, it will creates a Scatter Chart that displays relationship between height and weight for a group of people. you can modify the data to create your own Scatter Chart with Kivy.

 

 

This will be the result

How to Create Scatter Chart with Python Kivy
How to Create Scatter Chart with Python Kivy

 

 

Learn More on Kivy

Leave a Comment