我試圖用plotly繪製大量數據點(2mm-3mm)的東西。plotly:數量龐大的數據點
當我運行
py.iplot(fig, filename='test plot')
我收到以下錯誤:
Woah there! Look at all those points! Due to browser limitations, the Plotly SVG drawing functions have a hard time graphing more than 500k data points for line charts, or 40k points for other types of charts. Here are some suggestions:
(1) Use the `plotly.graph_objs.Scattergl` trace object to generate a WebGl graph.
(2) Trying using the image API to return an image instead of a graph URL
(3) Use matplotlib
(4) See if you can create your visualization with fewer data points
If the visualization you're using aggregates points (e.g., box plot, histogram, etc.) you can disregard this warning.
於是我嘗試將它與這個保存:
py.image.save_as(fig, 'my_plot.png')
但後來我得到這個錯誤:
PlotlyRequestError: Unknown Image Server Error
我該如何正確地做到這一點?我不在乎它是否是筆記本中的靜止圖像或交互式顯示。
你生成了什麼樣的情節?對於散點圖,嘗試使用'scattergl'。 –
現在,試圖做一個密度陰謀。 –