Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
When I create plot using a python visualization in powerBi it looks like this:
Notice that the image is not as wide as it could be as there appears to be padding on the left and right of the image. I am wanting to know how to get rid of this padding and make the image span the entire width.
The relevant part of the code is:
You will notice that I have already tried increasing the figure size through figure(figsize=(100,10)) and have used tight_layout to attempt to get rid of the width-related-padding without success (note that tight-layout successfully gets rid of the height related padding). If you know how to get rid of this width-related padding I would much appreciate it.
Note that figure(figsize=(x,y)) is operating strangely and sometimes increasing the values of x, y decreases the size of the image. It only does this in powerBI, it doesnt do this if I run the python script within python (rather than within a python visualization script within powerBi). I manage to get the image as big as possible with x=60, y=30 but it is still not wide enough. It appears to make the image slightly wider if I use x=50, and y=30 (strange i know, as x is smaller) but part of the title goes into the padding and cutout. I feel it is almost lile it is using the values of x,y to set the proportions of the image rather than the size, and it is attempting to fit the largest image within those proportions
that can fit into the space (but even this is not quite right, so I dont really know what it is doing.
Here is the link to the report:
https://drive.google.com/file/d/1OEjBMUAeyDn_cceigDgNJGnO21QIUH8V/view?usp=sharing
This came up recently in this forum. You can solve it be using subplots and playing with the aspect ratio. Note that you cannot really predict what screen geometry will be used by the report consumers.
@lbendlinDid this come up in a question on this forum? Are you able to give me a link to the question?
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
77 | |
60 | |
58 | |
58 |
User | Count |
---|---|
151 | |
113 | |
99 | |
80 | |
72 |