python - How to set the inline image opaque in QtConsole3? -


i run qtconsole3 thw following command:

ipython3 qtconsole --cache-size=4000 --matplotlib=inline --colors=linux 

and plot figure following lines:

in [1]: import numpy np  in [2]: import matplotlib.pyplot plt  in [3]: x = np.linspace(-1, 1, 1024) * 4 * np.pi  in [4]: y = np.sin(x) / x  in [5]: plt.plot(x, y) 

however, axis , labels in figure disappeared because inline figure transparent , background black. enter image description here

so how run qtconsole arguments such inline figure display proper?

you change rcparams programatically before plotting

matplotlib.rcparams['figure.facecolor'] = "(1, 1, 1)" 

or in matplotlibrc file; or explicit:

fig = figure(facecolor='w') ax = fig.add_subplot(111) ax.plot(x, y) fig 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -