python - Borderless matplotlib plots -


is there way save matplotlib graphs without border around frame while keeping background not transparent?

setting frame 'off' show in code below not work removes background making transparent whereas want retain white background, without borders.

a = fig.gca()   a.set_frame_on(false)   

here screenshot of i'm trying do. if border can removed can draw x-axis line separately.

enter image description here

all suggestions appreciated.

a similar question asked here: how can remove top , right axis in matplotlib?. google search "hide axes matplotlib" gives 5th link.

remove spines:

x = linspace(0, 2 * pi, 1000) y = sin(x) fig, ax = subplots() ax.plot(x, y) ax.spines['top'].set_visible(false) ax.spines['right'].set_visible(false) ax.spines['left'].set_visible(false) ax.grid(axis='y') 

enter image description here


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -