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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.