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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
niyati_61
Helper III
Helper III

python visual: Scatter Plot 2 sets of data points

Hello,

 

I used a Python Visual to make the Scatter Plot Chart below, however the X-Axis is not visible? 

The X-Axis has a lot of Date Time Data (Eg: 2021-10-04 07:57:40). However it is just showing as a blank black line.

Black Points Marked (Measured) 

 

Also, how do I add another set of data points to this graph? Red Points (For Simulation) But that will be against another X and Y axis. I require it in the same scatter plot chart.

niyati_61_0-1636819446500.png

 

Thank you!

2 REPLIES 2
niyati_61
Helper III
Helper III

Hi @YukiK ,

Thanks for replying, appreciate it!
Actually the color of the data points is not the issue here. And yes, I did try streching the visual to its max size, and I used the formula too however my x-axis is not visible still. 

 

Okay, let me explain exactly what I require. 

Currently I'm working with CSV data, 2 Files as shown below, 

Measured Data

niyati_61_1-1636802085547.png

 

Simulation Data

niyati_61_2-1636802141060.png

 

I want to make a scatter plot chart using a python visual. 

Imp Note: The measured CSV File has around 8k rows,

and the simulation CSV File has around 1.5k rows.

 

They are not plotted against the same exact times. The reason why Simulation has less points is that, once the Measured is marked on the chart, the simulation data points cover from the beginning to the end like overall.

 

So bascially for both of these, we need to use all the 4 axes.

 

This is what I finally want, 

niyati_61_0-1636802933987.png

 

I tried it in Power BI, I can get the Measured points in one chart (Like I have shown here), and similarly Simulation points in another chart. 

But, how do I combine the 2 together in one chart like this one?

 

Kindly require your assistance asap. Thank you in advance!

YukiK
Impactful Individual
Impactful Individual

I'm guessing the issue is in your Python code. You can specify color like this (if using matplotlib):

 

plt.scatter(x, y, color = 'hotpink')

 

As far as the x-axis goes, I think the size of the visual is simply small for the number of values that need to be shown. So if just making the visual bigger in Power BI doesn't work, try have it wider in matplotlib like this:

 

figure(figsize=(20, 8))

 

Let me know if this helps!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.