Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 79013e1

Browse files
committed
modif the big data warning + add skip for 'scattergl' traces
1 parent 477a679 commit 79013e1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

plotly/plotly/plotly.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,18 +212,23 @@ def plot(figure_or_data, validate=True, **plot_options):
212212
figure = tools.return_figure_from_figure_or_data(figure_or_data, validate)
213213

214214
for entry in figure['data']:
215+
if entry['type'] != 'scattergl':
216+
continue
215217
for key, val in list(entry.items()):
216218
try:
217219
if len(val) > 40000:
218220
msg = ("Woah there! Look at all those points! Due to "
219-
"browser limitations, Plotly has a hard time "
221+
"browser limitations, Plotly the SVG drawing "
222+
"functions have a hard time "
220223
"graphing more than 500k data points for line "
221224
"charts, or 40k points for other types of charts. "
222225
"Here are some suggestions:\n"
223-
"(1) Trying using the image API to return an image "
226+
"(1) Use the 'go.Scattergl' trace object to "
227+
"generate a WebGl graph.\n"
228+
"(2) Trying using the image API to return an image "
224229
"instead of a graph URL\n"
225-
"(2) Use matplotlib\n"
226-
"(3) See if you can create your visualization with "
230+
"(3) Use matplotlib\n"
231+
"(4) See if you can create your visualization with "
227232
"fewer data points\n\n"
228233
"If the visualization you're using aggregates "
229234
"points (e.g., box plot, histogram, etc.) you can "

0 commit comments

Comments
 (0)