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
mjo31
Frequent Visitor

Python Visual :Increase the size of the visual

Hi,

I am trying to generate a python visual from power BI. I was able to generate a line chart. But I am unable to increase the size of the visual in power BI.Its always fixed.

Code: Output is a dataframe with Actual and Optimized Budget.I used matplotlib to plot line chart

 

import matplotlib.pyplot as plt
output[['Actual Budget','Optimized Budget']].plot()
#plt.figure(frameon=False,dpi=200)
#plt.figure(figsize=(20,18))
plt.rcParams["figure.figsize"]=(80,50)
plt.show()
 
Below is visual.As you can see the python visual size is fixed, and unable to increase the size of visual.
 
mjo31_0-1630321836450.png

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @mjo31 

 

See if these can help:

plt figsize Code Example (codegrepper.com)

How to Set the Size of a Figure in Matplotlib with Python (learningaboutelectronics.com)

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @mjo31 

 

See if these can help:

plt figsize Code Example (codegrepper.com)

How to Set the Size of a Figure in Matplotlib with Python (learningaboutelectronics.com)

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

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.