Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
The matplotlib plot that shows up in Power BI, is different from that one, that the same code generates in a jupyter notebook.
Please help.
Solved! Go to Solution.
Thank you @Pragati11 and @amitchandak .
The issue was with the sequence of columns. Power BI sends the columns in the alphabetical order, and not in the order in which the columns get uploaded.
Thanks again for your prompt support.
Thank you @Pragati11 and @amitchandak .
The issue was with the sequence of columns. Power BI sends the columns in the alphabetical order, and not in the order in which the columns get uploaded.
Thanks again for your prompt support.
Hi @Anonymous ,
Can you share some screenshots here please with the following:
Thanks,
Pragati
@amitchandak wrote:@Anonymous, can share some sample images?
Hi @Anonymous ,
I can see the difference clearly in the y-axis scaling.
In Jupyter your y-axis range is till 2200, thereore the graph shows a different pattern.
In Power BI your y-axis range is till 2950, therefore graph is different.
In your pythin script when you are generating plot in Power BI, you will have to define range for your y-axis. Try giving this range similar to that in Jupyter notebook. I am sure you will get the same graph.
Thanks,
Pragati
Hi @Pragati11 ,
Thank you.
It didn't work. First one is from Power BI, and the seocnd one from jupyter notebook.
It didn't work.
Code:
Hi @Anonymous ,
Can you make sure that under this visual in Power BI, the fields that you have used - they are set to Don't Summarise?
This could be the reason why you don't see anything in Power BI for the same python script.
Thanks,
Pragati
Hi @Anonymous ,
Yes I can access them. Let me check and get back to you on this. 🙂
Thanks,
Pragati
Hi @Pragati11 ,
Must be something with the settings. It is working just fine. Please refer to the attached screenshot.
Hi @Anonymous ,
I am not sure. there doesn't seem to be a setting issue.
I tried a case at my end by using xlim and it seems to work just fine at my end.
See below my original chart:
Now I set a limit on my x-axis and I get the following:
The only different thing I have used in my code is ax = plt.gca() to get the current axis and then apply limit on the axis range.
Can you try adding that in your python script and check it?
Thanks,
Pragati
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
126 | |
113 | |
72 | |
65 | |
46 |