People with an IT background attending the Power BI Online training find it easier to use Python in Power BI then DAX. However, people with business background attending Power BI online training find DAX easier. Power BI’s developers ensure that Power is useful for people with all technical and non-technical backgrounds. An example of such instance is the creation of visuals using interface of Power BI and programming language of Python. Python’s Matplotlib is a powerful visualization library to support data visualization. Matplotlib was essentially developed to make visualization easier for MATLAB users.
This blog assumes that the reader is familiar with the basic python syntax and has python installed on his local machine. However, if you’re new to this language. Here’s a list of blogs to get started:
In this blog post, a step by step guide on downloading, installing and integrating python with Microsoft Power BI is presented.
This blog discusses the importing and manipulating in Python scripts in Power BI..
Box plot is one of the most recommended visuals for exploratory data analysis. It is also known as box and wisker plot and displays the data distribution using the data quartiles. Box plot can be created in Power BI using some python libraries such as Matplotlib and Pyplot. This blog posts presents a step-by-step guide to creating a box plot in Power BI desktop using python.
Creating Plot Visualization
This visualization plot draws lines in the plotting area. We will be using the powerful Matplotlib library. The picture below shows the use of plot() visualization. If you use a single list then matplotlip will assume the sequence as y values and will generates x values for it. The x values start from 0.
To get started:
1. Open the Python script editor.
2. Type the code as shown below.

The above Python script generates the following plot.

Now we will be customizing our Visual.
3. To give more clarity to our visual, we will be adding labels to our chart. For the definition of labels, type the below code.

The code snippet above adds labels to the axis of the plot. It will generate the following output.

You can also customize the chart title using the ‘Title’ property in the format area.
4. To go to Format Area click on the following icon.

The following tab will appear.
5. Then click on Title.

You can write your title in the ‘Title text’ field. You can also change the following properties.
- Font color
- Background color
- Text size
- Text font
- Text alignment
Below is an example of a customized chart title.

Conclusion:
Plots drawn in Power BI using python’s Matplotlib are similar to the ones drawn in any other python environment. These plots are also essentially different from the contemporary visualization visuals supported in Power BI. The type of plots that can be drawn in Power BI using python are highly dependent on the power of Python’s visualization library. In this blog post, a step by step guide on creating plots using Python’s Matplotlib is presented.
More Checkouts for Power BI Training in Australia.
Power BI Basic training course across Australia.
Power BI Advanced training course across Australia.
Power BI DAX training course across Australia.
Power BI Corporate training across Australia.