Site icon Python GUI

3 Ways To Create Enterprise-Grade Graphics Using The Seaborn Library

With the growing demand for Data Science and Analytics skill sets, drawing stunning graphics programmatically is one of the most popular tasks these days. Especially the high-quality plots that will easily give insights and effectively tell stories visually to the users. You can easily solve it by combining the Seaborn library with Python4Delphi (P4D). P4D is a free set of powerful tools that allows you to work with Python scripts, modules, and types in Delphi and easily create Windows GUIs with Python Windows GUI Builder.

What is Seaborn?

Seaborn is a library for making statistical graphics in Python. It is built on top of matplotlib and closely integrated with pandas data structures. Seaborn will enhance the matplotlib plotting functionalities.

What can the Seaborn library do for my apps?

Here is some of the functionality that Seaborn offers:

Seaborn aims to make visualization a central part of exploring and understanding data. Its dataset-oriented plotting functions operate on data frames and arrays containing whole datasets and internally perform the necessary semantic mapping and statistical aggregation to produce informative plots.

Can you show me a demo of how to use the Seaborn library in my apps?

This post will guide you on how to run the Seaborn library using Python for Delphi to display it in the Delphi Windows GUI app.

First, open and run our Python GUI using project Demo1 from Python4Delphi with RAD Studio. Then insert the script into the lower Memo, click the Execute button, and get the result in the upper Memo. You can find the Demo1 source on GitHub. The behind the scene details of how Delphi manages to run your Python code in this amazing Python GUI can be found at this link.

Here is the sample of how seaborn would enhance matplotlib and pandas scatterplot, inside Python4Delphi GUI:

1. Scatterplot with Multiple Semantics

[crayon-663268038d14c714628383/]

The output in Python GUI:

 

2. Scatterplot with Continuous Hues and Sizes

[crayon-663268038d158740885407/]

The output in Python GUI:

 

3. Scatterplot with Varying Point Sizes and Hues

[crayon-663268038d15a029945695/]

The output in Python GUI:

 

Congratulations, now you have learned how to run the Seaborn library using Python for Delphi to display it in the Delphi Windows GUI app! Now you can solve various real-world problems using plots created by the Seaborn library and Python4Delphi.

Check out the Seaborn data visualization library for Python and use it in your projects: https://pypi.org/project/seaborn/ and

Check out Python4Delphi which easily allows you to build Python GUIs for Windows using Delphi: https://github.com/pyscripter/python4delphi

Exit mobile version