Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
42 | |
40 |