#!/usr/bin/env python # coding: utf-8 # In[1]: import bqplot as bq # In[2]: get_ipython().run_line_magic('matplotlib', 'inline') import matplotlib.pyplot as plt import pandas as pd import numpy as np # In[3]: x = np.linspace(0,10,100) y = np.sin(x) y[20]=-9.9 # In[4]: plt.plot(x,y) # In[5]: y = np.ma.masked_equal(y, -9.9) # In[6]: plt.plot(x,y) # In[7]: sc_x = bq.LinearScale() sc_y = bq.LinearScale() series = bq.Lines(x=x, y=y, scales={'x': sc_x, 'y': sc_y}) ax_x = bq.Axis(scale=sc_x) ax_y = bq.Axis(scale=sc_y, orientation='vertical') figure = bq.Figure(marks=[series], axes=[ax_x, ax_y]) figure.layout.height = '300px' figure.layout.width = '500px' # In[8]: figure # In[ ]: # In[ ]: