Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

[Custom Python Visual] Maplotlib Bar Chart Is Showing Empty Space

Hello,

 

As the title says, Matplotlib Bar Chart is showing alot of empty spaces.

 

I want the bar chart to take up all the empty spaces shown below.

 

Any advice on how to get this done?

 

Thank you in advance!

 

kenkenken_0-1660019861758.png

 

3 REPLIES 3
Anonymous
Not applicable

Hi @ray_ux,

 

Thank you for your comment.

 

I think my post is a little vague. What I'm trying to do is fill up the allotted space for the Python visual.

 

Is this an aspect ratio issue? Do you have any other advice?

 

Thank you in advance!

 

kenkenken_0-1660271675455.png

 

ray_ux
Memorable Member
Memorable Member

@Anonymous 
To get rid of whitespace around the border,  set bbox_inches='tight' in the savefig() method.

I recommend using plotly js custom visual https://appsource.microsoft.com/en-us/product/power-bi-visuals/akvelon.plotlyjsvisualbyakvelon?tab=Overview

You can select bar graph and built on top of it - it has more functionality and is easier to configure stuff.

Anonymous
Not applicable

As a comparison, the table below is what I want the chart to look like.

 

The chart inside the square fills up all of its allotted space. No empty spaces.

 

kenkenken_0-1660271933858.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors