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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Python: maximum displayable points on chart

Hey guys!

 

I have created a scatter plot that has the date on the X-axis and various values on the Y-axis (Columns: maxCurrentCutter & maxCurrentNormal — see screenshot). Since I wanted a slicer for differentiation, I transformed the table into a Unipivot table. However, when I want to visualize this, only the data points from 2020 to 2022 are visible on the visual, not 2020-2024. I'll show you a screenshot with the original table (maxCurrentCutter & Normal as two separate columns) and one with the Unipivot table.

 

In the Unipivot table, there are naturally twice as many rows as in the original table (about 250K vs. 125K), and even when I filter the Unipivot visualization so that about 140K data points are again present, it works as usual. But the original Visual has also 250K values and there it works to show all the data.

 

Therefore, my question is: Is there a maximum number of displayable points in Python visuals, or why else are not all datasets displayed?

That doesn't make any sense to me 

 

--------------------------------------------------------------------------------------------

Unipivot-visualisation:

dominicghr_0-1713167429859.png

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates

# Datetype of 'Date'
dataset['Date'] = pd.to_datetime(dataset['startDate'])

# Define colors based on the 'Attribute' column.
colors = np.where(dataset['Attribute'] == 'maxCurrentCutter', 'green', 'orange')  # 'green' is for cutter, 'orange' is for normal

#Plot
plt.scatter(dataset['Date'], dataset['Value'], s=10, c = colors)

plt.title('Max Thread Cut Current')
plt.xlabel('DateTime')
plt.ylabel('[Ampere]]')
plt.grid(True)

# vertical Grid
#plt.gca().xaxis.grid(False)
plt.xticks(rotation=30)
plt.tight_layout()
plt.legend(handles=[matplotlib.patches.Patch(color='green', label='maxCurrentCutter'),
                    matplotlib.patches.Patch(color='orange', label='maxCurrentNormal')],
           loc='upper left')

plt.show()

 

Original visual:

dominicghr_1-1713167785083.png

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

# Datetype of 'Date'
dataset['Date'] = pd.to_datetime(dataset['startDate'])

# Plot  
plt.scatter(dataset['Date'], dataset['maxCurrentCutter'], color='green', s=10, label='maxCurrentCutter')
plt.scatter(dataset['Date'], dataset['maxCurrentNormal'], color='orange', s=10, label='maxCurrentNormal')


plt.title('Max Thread Cut Current')
plt.xlabel('Date')
plt.ylabel('[Ampere]]')
plt.grid(True)
# vertical Grid
#plt.gca().xaxis.grid(False)
plt.xticks(rotation=30)
plt.tight_layout()
plt.legend(loc='upper left')

plt.show()

 

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Anonymous ,

 

This does not match what the official documentation says, my guess is that the Unipivot table has an increased amount of data and therefore only shows the first part of the data.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

The solution is simple: The data the Python visual uses for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used, and a message appears on the image. The input data also has a limit of 250 MB.

More for this: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals#limitations

 

Hope it helps somebody

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

The solution is simple: The data the Python visual uses for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used, and a message appears on the image. The input data also has a limit of 250 MB.

More for this: https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-visuals#limitations

 

Hope it helps somebody

Anonymous
Not applicable

Hi @Anonymous ,

 

This does not match what the official documentation says, my guess is that the Unipivot table has an increased amount of data and therefore only shows the first part of the data.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors