Forum Discussion
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
Any help would be greatly appreciated.
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.
2 Replies
- v-jingzhangCommunity 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. - daloomNew Member
A simple solution could be to only set your plot tightness with plt.tight_layout()
import seaborn as snsimport matplotlib.pyplot as pltwith sns.plotting_context("paper", font_scale=1.5,):sns.violinplot( data=dataset, x="season", y="registered", hue="weekday", orient="v")# eliminate the default big margins across your plotplt.tight_layout()plt.show()Tight layoutNormal layout