Questions tagged [mpld3]

The mpld3 project brings together Matplotlib, the popular Python-based graphing library, and D3js, the popular Javascript library for creating interactive data visualizations for the web.

The mpld3 project brings together Matplotlib, the popular Python-based graphing library, and D3js, the popular Javascript library for creating interactive data visualizations for the web. The result is a simple API for exporting your matplotlib graphics to HTML code which can be used within the browser, within standard web pages, blogs, or tools such as the IPython notebook.

154 questions
4
votes
3 answers

Extend python plots to full screen

I want to extent the python plots I am plotting using mpld3 to full screen. I wish to use mpld3 due to the following reasons I wish to have around 4 plots and have the zoom option for each plot. All plots must be displayed in the same…
Ram
  • 634
  • 1
  • 9
  • 22
4
votes
1 answer

How to "dump" points selected with the LinkedBrush plugin for mpld3?

I am trying to implement a plugin that allows the user to dump relevant information about points selected by the LinkedBrush plugin. I think my question is sort of related to this example. I have meta information tied to each point via the…
mattcart
  • 83
  • 9
3
votes
1 answer

Rendering mpld3 JSON chart in React

Good day. I just recently came across mpld3 and I am trying to see if it will be the solution to my issue. I want to create Matplotlib charts in Python, save them as JSON objects to a database, and then render them in my React webpage. So far I have…
CarlaVdB
  • 165
  • 11
3
votes
0 answers

Show mouse position also for datetime x axis within google colab

For a matplotlib that is displayed in an external window (using matplotlib.use('TkAgg')), the following snippet shows the x/y cursor mouse hover correctly also for a datetime x axis: import matplotlib matplotlib.use('TkAgg') from datetime import…
user7468395
  • 1,299
  • 2
  • 10
  • 23
3
votes
1 answer

Exporting matplotlib 3d scatter plot as html, possible?

Wish to have interactive 3D Scatter plot in browser. The plot is built using matplotlib and should be saved as html. Closest solution found is mpld3 library, but it works only for 2d scatter plot and not 3d. Plotly is ruled out it has restrictions…
3
votes
1 answer

Creating a WEB UI for my python scripts

So, I have a website where I want to show my outputs of my machine learning programs in real-time. Every output is based on the User's input. I have successfully created my python scripts which give me my desired output, but untill now i was just…
johnny68
  • 421
  • 1
  • 6
  • 21
3
votes
1 answer

MPLD3 with Python error

I tried to replicate the example found on this website: http://mpld3.github.io/examples/scatter_tooltip.html But I get the following error: Object of type 'ndarray' is not JSON serializable I can't figure out what I need to change. Here's the…
Rom M
  • 129
  • 14
3
votes
2 answers

Mpld3 inside of Django Views - "NoneType" Object has no attribute "split"

I am trying to make a request to my Django back-end with AJAX. I got the AJAX part working, but I am now trying to return an mpld3 figure to display it on the page. This is the HTML Form:
OhMad
  • 6,871
  • 20
  • 56
  • 85
3
votes
1 answer

Changing tick label colour in mpld3

I am trying to plot stuff using matplotlib and mpld3. This is the code I use to generate my graph: _fig = plt.figure() _pl = _fig.add_subplot(111) _pl.plot(_times,…
Hannu
  • 11,685
  • 4
  • 35
  • 51
3
votes
1 answer

Can the 'webagg' backend for matplotlib work with my django site?

I've searched a lot on this topic but I'm not a web developer so I know I'm missing some concepts. When I run matplotlib locally and specify the 'webagg' backend, running plt.show() starts a lightweight webserver and opens the plot in my browser…
Mike J
  • 47
  • 7
3
votes
1 answer

How to create a real-time plot with mpld3

Is there a way to add a new data point and remove an old one (push, shift principle) with mpld3 on the frontend side? I would like to make a real-time plot using mpld3. Initializing the plot once and updating it with websockets for example... The…
LtMerlin
  • 165
  • 1
  • 6
3
votes
0 answers

MPLD3 not showing graph in browser

I'm using Google Chrome on Mac OS X 10.11.4. Im trying to run this example from the mpld3 library. I read that mpld3 does not work on python 3.5, The mpld3 project is compatible with Python 2.6-2.7 and 3.3-3.4. so I created a 3.4 environment…
Neill Herbst
  • 2,072
  • 1
  • 13
  • 23
3
votes
0 answers

can I use mpld3 in a loop to create multiple plots?

I tried to create multiple mpld3 figures with a loop. However, nothing is produced: import matplotlib.pyplot as plt import mpld3 mpld3.enable_notebook() for i in range(0, 10): fig,ax=plt.subplots() ax.plot([1,3], [2,4], 'bo') …
Amber
  • 31
  • 2
3
votes
1 answer

mpld3 mouse position plugin for a timeseries plot

I am trying to create a mpld3 mouse position plugin for a timeseries plot with a datetime on the x axis similar to this example. However, I keep getting the following error in the console: TypeError ax.x.invert is not a function x =…
3
votes
1 answer

mpld3 plot, annotations issues

I'm using mpld3 to display graphs on an intranet website. I'm using the option of saving the graph to a dict and render it on the client side using mpld3.js. The graph renders fine except when I want to use annotations. Those ones are clearly…
Julien
  • 231
  • 4
  • 18
1
2
3
10 11