0

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 mpl
%matplotlib inline
import matplotlib.pyplot as plt
import mpld3
mpld3.enable_notebook()

This doesn't work. I get a figure without the plot for the first graph. This was also in https://github.com/mpld3/mpld3/issues/188 noted as a problem but it is surely old, isn't it? Is there anything I can do? This is probably a very basic question, but I don't understand what I'm doing wrong and I don't find any solution! Thanks for any comment!

ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712
HCRuiz
  • 65
  • 10
  • In the [mpld3 thread](https://github.com/mpld3/mpld3/issues/188) you link to the workaround is to set the background of the second axes to transparent. Does this not work for you? Could you provide a [mcve]? – ImportanceOfBeingErnest Feb 27 '17 at 16:27
  • Thank you a lot for your answer! I must have missed it when I went to the Twinx twiny bugfix #204 thread! Sorry about that! On the other hand, this is a sort of temporary solution for me because to be able to work properly, I need to interact with the graphs and somehow, the graphs move independently (zoom works well for both at the same time)... Is there any way of joining them into a single layer? Thanks for the help! – HCRuiz Feb 27 '17 at 17:03

0 Answers0