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
0 answers

How to make HTML tooltips appear when hovering over a point in multiple axis?

Although similar To this mouseover question, need solution using matplotlib mpld3 HTML tools. This code displays two plots, but only the second one has mouseover annotations. How to get tooltips on both plots? import matplotlib.pyplot as plt import…
runrig
  • 6,486
  • 2
  • 27
  • 44
0
votes
0 answers

Generating animation in the browser using matplotlib

Let me describe the background first: We have a python package that uses matplotib to create animations. Currently, we use this package to create gifs, which we embed into our website. In the future, the number of animations will increase, so that…
llisch
  • 1
  • 1
0
votes
0 answers

How to get mpld3 to display the same figure as matplotlib without it?

I have an existing system using matplotlib that just saves the figure to a .png file: rootfilename = '%d.png' % t fyle = settings.MEDIA_ROOT + '/' + rootfilename fig.savefig(fyle) context = {'ourimg' : rootfilename} return render(request,…
Mark McWiggins
  • 621
  • 6
  • 20
0
votes
1 answer

Mpld3: blurry image

I created a matplotlib figure (matplotlib on server) and displaying it with mpld3.draw_figure (nodejs on client) only gives blurry images, similar to the ones here: How to 'turn off' blurry effect of imshow() in matplotlib? …
instantlink
  • 180
  • 1
  • 9
0
votes
1 answer

How to rotate x-axis tick labels on matplotlib bar chart? Tried several approaches, none worked

I cannot rotate the x tick labels on a matplotlib bar chart, so those labels currently overlap. I've done some matplotlib documentation reading as well as other reading, and tried different approaches, yet none have worked. From my understanding of…
John
  • 49
  • 1
  • 7
0
votes
1 answer

Custom discrete slider in Python/Django or D3

I'm working on a custom survey app for a small company intranet and would like to design custom sliders. I need to have discrete sliders that can indicate values from 1-5 but would allow you to select your level based on hover over and click…
stagermane
  • 1,003
  • 2
  • 12
  • 29
0
votes
1 answer

Matplotlib animation in browser

I'm having trouble trying to view my animated graph in the browser using mpld3. Any tips as to what I'm doing incorrectly? If I could figure out how to convert it to html so I can embed it in my website, that would be even better. import…
Mimi
  • 11
  • 1
0
votes
1 answer

Doubts about adding matplotlib graphs to a webpage

So, I'm learning how to use matplotlib and stumbled into MPLD3 as the most used way to get these plots in a webpage. However, MPLD3 doesn't support tick formatting and that's something critical for the project I'm in right now. I'd like to know if…
0
votes
1 answer

Printing multiple plots in the web browser using mpld3

In the code I am trying to print 3 plots in the web browser but only 2 of the plots(high2 and high3) are printing. Can you tell me how to get all the 3 plots? Thanks #Plot 1 for index, row in Taskee_assi.iterrows(): …
0
votes
1 answer

Flask stuck loading after opening a certain route with a function

I'm relatively new to Python and Flask. I've been trying to create a web application that reads data readings from a .txt file and plots them onto a matplotlib plot. In this web-app, I have a front page with 3 buttons. These buttons redirect to…
0
votes
1 answer

How to get actual data points from a graph using python?

I have made a graph on stock data using fbprophet module in python. my graph looks like this : The code i m using is this: model = Prophet() model.fit(df) future = model.make_future_dataframe(periods=365) # forecasting for 1 year from…
Abdullah Ahmed Ghaznavi
  • 1,978
  • 3
  • 17
  • 27
0
votes
1 answer

how to print matplotlib plot in a html page

I am trying to plot a stacked graph using Matplotlib in HTML page (python -cgi). I have the following script `#!/usr/bin/python print "Content-type:text/html\r\n\r\n" print '' print '' print 'Hello Word - First CGI…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/mpld3" class="post-tag grid--cell" title="show questions tagged 'mpld3'" rel="tag">mpld3</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 25 '18 at 12:53">asked May 25 '18 at 12:53</time> <a href="../../users/9662797/sam" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/9662797.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Sam" /> </a> <div class="s-user-card--info"> <a href="../../users/9662797/sam" class="s-user-card--link">Sam</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">145</li> <li class="s-award-bling s-award-bling__bronze" title="11 bronze badges">11</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-50431978"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/50431978/mpld3-styling-issue-when-saving-to-html" class="question-hyperlink">Mpld3 styling issue when saving to html</a></h3> <div class="excerpt">When I save the plot to html, the styling is different to what it shows within Jupyter. Following image is direct from jupyter and is exactly how I want it: plot from jupyter The following image is what is saved by the mpld3 code: plot from…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/matplotlib" class="post-tag grid--cell" title="show questions tagged 'matplotlib'" rel="tag">matplotlib</a> <a href="../../questions/tagged/jupyter" class="post-tag grid--cell" title="show questions tagged 'jupyter'" rel="tag">jupyter</a> <a href="../../questions/tagged/mpld3" class="post-tag grid--cell" title="show questions tagged 'mpld3'" rel="tag">mpld3</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 20 '18 at 05:33">asked May 20 '18 at 05:33</time> <a href="../../users/9758267/lee-mapstone" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/9758267.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Lee Mapstone" /> </a> <div class="s-user-card--info"> <a href="../../users/9758267/lee-mapstone" class="s-user-card--link">Lee Mapstone</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3</li> <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-50018194"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/50018194/providing-an-option-to-download-mpld3-plot-as-image-in-flask-app" class="question-hyperlink">Providing an option to download mpld3 plot as image in flask app</a></h3> <div class="excerpt">I've been trying out certain mpld3 plots and have come up with a doubt. I know mpld3 plots can be saved locally using savefig() function. My question is whether it would be possible to provide a download option so as to download the plot as an image…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/matplotlib" class="post-tag grid--cell" title="show questions tagged 'matplotlib'" rel="tag">matplotlib</a> <a href="../../questions/tagged/flask" class="post-tag grid--cell" title="show questions tagged 'flask'" rel="tag">flask</a> <a href="../../questions/tagged/mpld3" class="post-tag grid--cell" title="show questions tagged 'mpld3'" rel="tag">mpld3</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 25 '18 at 09:05">asked Apr 25 '18 at 09:05</time> <a href="../../users/6557487/amal-sailendran" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/6557487.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Amal Sailendran" /> </a> <div class="s-user-card--info"> <a href="../../users/6557487/amal-sailendran" class="s-user-card--link">Amal Sailendran</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">341</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badge">2</li> <li class="s-award-bling s-award-bling__bronze" title="16 bronze badge">16</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-49584653"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>0</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/49584653/mpld3-produces-axes-property-value-that-cannot-be-serialized-to-json" class="question-hyperlink">mpld3 produces axes property value that cannot be serialized to JSON</a></h3> <div class="excerpt">I am doing a scatter plot using matplotlib and trying to use mpld3 to plot it in HTML. The figure when converted to dict, produces a property edgewidths with value type array with single element of value 1. which json.dumps cannot serialize to a…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/matplotlib" class="post-tag grid--cell" title="show questions tagged 'matplotlib'" rel="tag">matplotlib</a> <a href="../../questions/tagged/python-3.5" class="post-tag grid--cell" title="show questions tagged 'python-3.5'" rel="tag">python-3.5</a> <a href="../../questions/tagged/mpld3" class="post-tag grid--cell" title="show questions tagged 'mpld3'" rel="tag">mpld3</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Mar 31 '18 at 05:42">asked Mar 31 '18 at 05:42</time> <a href="../../users/1195137/rag" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1195137.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Rag" /> </a> <div class="s-user-card--info"> <a href="../../users/1195137/rag" class="s-user-card--link">Rag</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,363</li> <li class="s-award-bling s-award-bling__gold" title="4 gold badges">4</li> <li class="s-award-bling s-award-bling__silver" title="19 silver badges">19</li> <li class="s-award-bling s-award-bling__bronze" title="36 bronze badges">36</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/mpld3_page=7" rel="prev" title="Go to page 7">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/mpld3_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/mpld3_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/mpld3_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/mpld3_page=10" rel="" title="Go to page 10">10</a> <a class="s-pagination--item" href="../../questions/tagged/mpld3_page=11" rel="" title="Go to page 11">11</a> <a class="s-pagination--item" href="../../questions/tagged/mpld3_page=9" rel="next" title="Go to page 9"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>