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
0
votes
1 answer

image to html using mpld3

I am trying to export the html of a graph using mpld3 import matplotlib.pyplot as plt, mpld3 obj, = plt.plot([3,1,4,1,5], 'ks-', mec='w', mew=5, ms=20) mpld3.save_html(obj,'C:\\Users\\prabhat.mishra\\Desktop\\figure.html') Facing Issue as…
prabhat mishra
  • 202
  • 2
  • 14
0
votes
0 answers

Embedding a Matplotlib Graph into HTML

I am trying to build a website. One part of the website needs that a graph is show based on user input. It will be built using Django. I have checked out a few options, mpld3 proving to be at least better than the others. The graph is kind of…
thegravity
  • 100
  • 2
  • 7
0
votes
0 answers

Matplotlib + d3 + mpld3: Interactively shrink or stretch axes

I am using matplotlib in order to create a plot like this: plot = plt.plot(data[[x]], data[[y]], 'o-') Then, I create a interactive d3.js plot using mpld3 visualization_html = mpld3.fig_to_html(fig) Result: Plot Sometimes, plots are not very well…
elias
  • 1
  • 1
0
votes
0 answers

60 seconds is shown as 12:01 on y axis when the matplotlib plot is saved as html using mpld3

have plotted a graph which has time on x axis and delta time on y axis. when the graph is saved as html using mpld3 maximum value on y axis is changed. how to have save graph as html without changing the value on y axis. import matplotlib.pyplot as…
0
votes
0 answers

line graph saved as html file using mpld3 shows timestamp ticks as unsigned int

I am trying to plot an line graph which has timestamp on x-axis and count on y-axis. The output of matplotlib plot is stored in an html file using mpld3 save_html() method. when the code is run on windows platform, the output is rendered as…
sunny
  • 643
  • 2
  • 11
  • 29
0
votes
1 answer

bar chart saved as html file using mpld3 shows x-axis ticks on top

I have a python code that stores the barchart as html file using the mpld3 save_html method. However, when I render the html file, the barchart shows x-axis ticks on the top as shown below. I don't want the ticks to be shown at all & also no tick…
sunny
  • 643
  • 2
  • 11
  • 29
0
votes
1 answer

How to add new line to the hover label in python plot?

I want to add the text with new line when specific point is hovered in the plot.For example if A point is hovered then the hovered label will display text like this, text1 text2 text3 Below is draw_plot function snippet: def…
space earth
  • 407
  • 4
  • 18
0
votes
1 answer

Overlapping legend when create plot with matplotlib and mpld3 in python

I'm a beginner in the world of python programming and I'm having a really hard time figuring out how to tackle my problem. The problem is when I created a plot using loop in python with matplotlib and mpld3, the plot is as I expected it to be but…
izz
  • 11
  • 7
0
votes
1 answer

TclError when creating plots using mpld3 in pythonanywhere

I am creating plots using matplotlib and mpld3 (both successfully installed) but when plotting I got this error message: ...File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1767, in init#012 self.tk = _tkinter.create(screenName, baseName,…
Bioinfo
  • 51
  • 5
0
votes
1 answer

How to draw a matplot lib (python) polar scatter chart in django?

I am writing a web application where I have to draw a polar scatter chart(https://matplotlib.org/examples/pie_and_polar_charts/polar_scatter_demo.html) in the webpage. The polar scatter chart is generated using python matplotlib and then is…
sshussain270
  • 1,785
  • 4
  • 25
  • 49
0
votes
1 answer

mpld3 interactive legend does not work in IE

I am using the mpld3 library in python and I have notice that on internet explorer the interactive legend plugins does not work. I've also notice that on the mpld3 web site, the example of interactive legend also does not work in IE. So i'm kind of…
0
votes
1 answer

Using plt functions on figures in matplotlib or passing plt to mpld3

Many examples define fig and ax with fig, ax = plt.subplots() and then they directly call functions on the figure object. In contrast, other examples work directly with plt. This answer explains some of the differences, but I am still unclear about…
Michael
  • 13,244
  • 23
  • 67
  • 115
0
votes
0 answers

Jupyter notebook: when using twinx() the first plot disappears. What am I doing wrong?

I would like to simply plot in the same figure two graphs with different scales. Following the standard example http://matplotlib.org/examples/api/two_scales.html, I tried this on the jupyter notebook adding the lines import matplotlib as…
HCRuiz
  • 65
  • 10
0
votes
1 answer

Getting Inverted image from Django html view

I am trying to make web-based snake&ladder game on Django, for which I am using matplotlib and mpld3 to create and display my game data on web page. I am able to get my image on the web page but it is inverted. Where am I going wrong in this…
Shubham Namdeo
  • 1,845
  • 2
  • 24
  • 40
0
votes
0 answers

Why is the Matplotlib graph not showing up in my Django webpage?

I've been working on a project in Python using Matplotlib in tandem with Django. Right now I just want to display the graph in the webpage. Before, I saved the figure as a PNG, and the graph showed up. Unfortunately, this disables some interactive…
Andrew Quoc-Anh Ho
  • 131
  • 1
  • 2
  • 12