2017-09-05 15 views
1

私は大量のデータポイント(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 

これを正しく行うにはどうすればよいですか?それが静止画像であるか、ノートブック内のインタラクティブディスプレイであるかは気にしない。あなたはそれをたい場合

+0

どのようなプロットを生成していますか?散布図については 'scattergl'を使ってみてください。 –

+0

今、密度プロットをしようとしています。 –

答えて

3

一つの選択肢はわからない、あなたのデータをダウンサンプリングのようになります。 https://github.com/devoxi/lttb-py

私も大規模なデータセットをブラウザでplotlyに問題がある - 誰もが解決策を持っている場合は、書いてください! ありがとうございました!

+0

LTTBサポートをプロットして統合するための未解決の問題があります。これは優先順位のようには見えません。https://github.com/plotly/plotly.js/issues/560 –

+0

これは線形データ、timeseriesに対してのみ実行可能です。あなたが他の種類のデータを持っているなら、それは非常に間違った結果を与えるかもしれません! – Petronella

関連する問題