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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.