![](/img/trans.png)
[英]Getting Error while reloading the matplotlib plot without refreshing the page
I am trying to reload the matplotlib figure without refreshing the page and using Slider to change the slice number using django, matplotlib, mpld3, ...
[英]Getting Error while reloading the matplotlib plot without refreshing the page
I am trying to reload the matplotlib figure without refreshing the page and using Slider to change the slice number using django, matplotlib, mpld3, ...
[英]Rendering mpld3 JSON chart in React
再會。 我最近剛剛遇到mpld3 ,我正在嘗試看看它是否能解決我的問題。 我想在 Python 中創建 Matplotlib 圖表,將它們作為 JSON 對象保存到數據庫中,然后在我的 React 網頁中呈現它們。 到目前為止,我已經在 Python 中創建了一個繪圖,使用 Matplotli ...
[英]How to plot animated matplotlib in html with mpld3
我想在 html 頁面中顯示一個圖表,該圖表正在監視我的 raspberry pi 中的傳感器數據。 我一直在使用 matplotlib 圖表,最近我安裝了 mpld3 庫,但我的代碼顯示了這個錯誤: 我正在運行的代碼是這樣的: 我的錯誤是什么? 或者,如果您知道如何僅使用 python 和 ht ...
[英]Insert Python's mpld3 images to HTML without saving them
我有一個 Python 腳本,它會進行一些計算並生成一個數字。 然后,我使用 mpld3 生成此圖的 HTML 版本並保存(例如,figure.html)。 Python 計算是通過對 HTTP 服務器的 AJAX 請求啟動的。 在我的 JS 文件中,我使用 jQuery.load() 方法將 p ...
[英]mpld3.fig_to_html throws AttributeError: module 'matplotlib.dates' has no attribute '_SwitchableDateConverter'
我在過去三個月使用 mpld3.fig_to_html ,它工作正常,但從最近兩天開始,它顯示錯誤。 我所有的代碼都停止工作。 誰能建議我如何解決這個錯誤? 錯誤:AttributeError:模塊“matplotlib.dates”沒有屬性“_SwitchableDateConverter” 此 ...
[英]mpld3.show() returns Object of type int is not JSON serializable
我想創建一個網絡,您可以將鼠標懸停在每個標簽上以交互方式閱讀它。 我正在使用 jupyter 實驗室,規格是:選定的 Jupyter 核心包... 當我在 jupyter notebook 中運行這段代碼時: 我從這里獲得,一個新窗口打開,帶有交互式標簽,正如預期的那樣,與超鏈接中的示例相 ...
[英]ClickInfo plugin problem on multiple mpld3 charts on same HTML page
我在同一個 HTML 頁面上有兩個 matplotlib 散點圖 plot 圖表(使用 mpld3.fig_to_html 渲染)。 我正在嘗試使用此 ClickInfo 插件使圖表上的每個點都可點擊(打開另一個 window 顯示更多信息)。 為這些圖表生成的 HTML 顯示不同的 id,但是當單 ...
[英]Output a centred HTML image with mpld3
I am using the mpld3 Python package to save out static matplotlib figures as interactive images in the html format. 一個簡單的例子如下: 但問題是在瀏覽器中打開 html 圖像時,它 ...
[英]Saving graphs to .html using mpld3
我正在嘗試使用 seaborn 和 mpld3 但在 a.html 文件中顯示圖表。 當我使用命令mpld3.show()時,會彈出一個新的 window 並且該圖顯示在創建的本地網絡服務器中(如文檔所述)。 但是,當嘗試將其保存在 .html 文件中時,圖表為空,但我可以看到一些圖標,如移動和縮 ...
[英]Can you make mpld-matplotlib interactive graph web app?
你能讓 mpld3-matplotlib 交互嗎? 我的意思是在 web 頁面上顯示圖表並能夠更新時間序列,即不僅僅是 static 圖表,而是動態一頁圖表應用程序? mpld3 可以利用什么? ...
[英]Export standalone offline html plot of matplotlib figures using mpld3
我正在嘗試使用 mpld3 將 matplotlib 圖形導出到獨立的 html 文件。 這有效: import numpy as np import matplotlib.pyplot as plt import mpld3 fig, ax = plt.subplots(1, 1) ax = a ...
[英]Absolute positions in mpld3 graphs
我正在嘗試為mpld3定義一個自定義插件,但我正在為職位而苦苦掙扎。 更具體地說,默認情況下, mpld3生成的 SVG 帶有Move和Zoom按鈕,它們可以改變圖形的視圖。 當我試圖顯示事物(如文本)時,我偶然發現了一種奇怪的行為,其中位置相對於當前視圖設置。 這意味着如果我在點A(10,10)旁 ...
[英]How to plot Lime report when there is a lot of features in data-set
我正在嘗試使用as_pyplot_figure()方法繪制石灰報告分類算法,以獲取as_pyplot_figure()的解釋。 它正在工作,但是我使用 mpld3 庫中的save_html()以 html 格式在本地保存的數據太壓縮了(實際上看不到)。 處理這種情況的任何其他方式都會有所幫助。 我 ...
[英]Highlighting lines on a random walk plot mpld3
我有一個由 id 、 value 列和相應的 [random walk plot][1] 組成的表,使用 mpld3。 我想預先突出顯示線圖中的特定線而不是鼠標懸停。 mpld3 的代碼片段:[1]: https ://mpld3.github.io/examples/random_walk.h ...
[英]mpld3 is not showing graph in Colab
我在google colab工作並使用mpld3到 plot 圖表。 直到上次一切正常,但現在colab在我使用mpld3時沒有顯示圖表。 當我簡單地使用pyplot而不使用mpld3時,我得到了一個圖表。 知道可能是什么問題嗎? 當我做 我也嘗試過mpld3.display()而不是plt.sho ...
[英]How to fix Object of type ndarray is not JSON serializable while using mpld3?
Python mpld3 '.show()' 給我這個錯誤“ndarray 類型的對象不是 JSON 可序列化的” 我知道這個問題在這里有很多重復,但是,我找不到最近的一個。 這似乎是 mpld3 的常見問題。 使用 Matplotlib 版本 3.1.3 使用 mpld3 0.3 版我也在使用 ...
[英]mpld3 using d3v3 and d3v4 on the same html page
我正在制作 web 應用程序,該應用程序現在在 python flask 本地服務器上運行。 在初始呈現我的索引頁面后,我使用 d3.json 進行 aync 調用: 因此,在 python 服務器中,該帖子詳細說明如下: 這將返回一個虛擬 plot(稍后我將用我在 python 中進行一些計算后 ...
[英]Is there a way to dynamically load pure HTML in React as a separate component?
嗨,我試圖將燒瓶應用程序與反應前端結合起來。 該項目主要關注使用 pandas 和 matplotlib 等庫的數據科學。 我試圖返回一個與 matplotlib fig 等效的 HTML,並試圖在前端呈現它。 由於它是純 HTML 而不是 JSX,因此當 react 嘗試渲染它時會引發錯誤。 ...
[英]Mpld3: blurry image
我創建了一個matplotlib圖(服務器上的matplotlib),並使用mpld3.draw_figure(在客戶端上的nodejs)顯示它,僅給出了模糊的圖像,類似於此處的圖像: 如何在matplotlib中“關閉” imshow()的模糊效果? 插值設置為“最近”,“無”並 ...
[英]mpld3 error : AttributeError: 'list' object has no attribute 'canvas'
我正在嘗試使用mpld3庫在我的瀏覽器上繪制Matplotlib數據。 但是我得到的問題是我得到了以下錯誤: 這些是我導入的mpld3對象。 這是將圖形保存為HTML的代碼。 如果我沒有將數據保存在html文件中,我將得到數字。 html文件已創建,但為空,並且 ...