beginnings in matplotlib - grey background

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

beginnings in matplotlib - grey background

vincent_mathoscope
hi
i got several answers from some of youn particularyl about differences between plt.... and fig....
i did not have time to understand more deeply all of that 
i spent my time creating the 75 figures of my book
some examples :
no i will start understandign better all of that
i have found how to disable automatic resizing of the figure when for example a curve takes too high values in y
lafigure.axis([xmin,xmax,ymin,ymax]) # permet que si qqch dépasse ça ne perturbe rien ; ouf...
now, i have too questions :
- how can i avoid the grey color of the figure ? i would like it to be blank
the second one in an other mail...

        ––––––––––––––––––––––––––
                  Vincent Douce
               :=: Mathoscope :=:
             http://mathoscope.xyz
                 06°13°11°07°26
          Bagnères de Bigorre 65200





_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users
        ––––––––––––––––––––––––––
                  Vincent Douce
               :=: Mathoscope :=:
             http://mathoscope.xyz
                 06°13°11°07°26
          Bagnères de Bigorre 65200
Reply | Threaded
Open this post in threaded view
|

Re: beginnings in matplotlib - grey background

vincent.adrien@gmail.com
Vincent,

Which version of Matplotlib are you using exactly? Besides, are you
applying some peculiar style sheet (i.e. calling something like
`plt.style.use(...)` somewhere)? Because I am pretty sure that the
default background color for axes is white (or at least not gray...).

Anyway, if I am correct you should be able to get a white background by
calling
```
ax.set_facecolor("white")
```
on (each) of your Axes instances. You could also define it once for all
in (each of) your script(s) by putting
```
plt.rcParams['axes.facecolor'] = "white"
```
before creating the figure(s)

Best,
Adrien

PS: please note that I think that the Figure instance (i.e. `fig`,
`lafigure`, etc.) have a similar function/attribute to set the
background color at the figure level.

On 12/13/2017 10:52 AM, Vincent Douce Mathoscope wrote:

> hi
> i got several answers from some of youn particularyl about differences
> between plt.... and fig....
> i did not have time to understand more deeply all of that
> i spent my time creating the 75 figures of my book
> some examples :
> no i will start understandign better all of that
> i have found how to disable automatic resizing of the figure when for
> example a curve takes too high values in y
> lafigure.axis([xmin,xmax,ymin,ymax]) # permet que si qqch dépasse ça ne
> perturbe rien ; ouf...
> now, i have too questions :
> - how can i avoid the grey color of the figure ? i would like it to be blank
> the second one in an other mail...
>
>          ––––––––––––––––––––––––––
>                    Vincent Douce
>                 :=: Mathoscope :=:
> http://mathoscope.xyz
>                   06°13°11°07°26
>            Bagnères de Bigorre 65200
>
>
>
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email]
> https://mail.python.org/mailman/listinfo/matplotlib-users
>

_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users