graphics defaults

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

graphics defaults

Ben Bolker-2

   Can someone point me to a justification for the design
decisions, which seem to be similar in lattice and
ggplot2, of (1) gray backgrounds and (2) filled points?
[I seem to remember seeing somewhere the opposite recommendation
for points, i.e. that open points make it much easier to
see if there are overlapping values -- and this would
be a reason that pch=1 gives an open circle ...]

   cheers
     Ben Bolker



______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

signature.asc (260 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: graphics defaults

hadley wickham
>    Can someone point me to a justification for the design
>  decisions, which seem to be similar in lattice and
>  ggplot2, of (1) gray backgrounds and (2) filled points?
>  [I seem to remember seeing somewhere the opposite recommendation
>  for points, i.e. that open points make it much easier to
>  see if there are overlapping values -- and this would
>  be a reason that pch=1 gives an open circle ...]

>From a paper I'm working on:

This follows from the advice of
\citet{tufte:2006,tufte:1990,tufte:2001,tufte:1997} and
\citet{brewer:1994,carr:2002,carr:1994,carr:1999}. We can still see
the gridlines to aid in judgement of position \citep{cleveland:1993a},
but they have little visual impact and we can easily ``tune'' them
out. The grey background gives the plot a similar colour (in a
typographical sense) to the remainder of the text, ensuring that the
graphics fit in with the flow of a text without jumping out with a
bright white background. Finally, the grey background creates a
continuous field of colour which ensures that the plot is perceived as
a single visual entity.

I can dig out the exact references if you need them.

Hadley

--
http://had.co.nz/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: graphics defaults

Deepayan Sarkar-3
In reply to this post by Ben Bolker-2
On 3/13/08, Ben Bolker <[hidden email]> wrote:
>
>    Can someone point me to a justification for the design
>  decisions, which seem to be similar in lattice and
>  ggplot2, of

Disclaimer: I don't have strong personal preferences, I just went with
what Trellis had. That said,

> (1) gray backgrounds and

lattice's default background is now white, and this was partly because
many people seemed to dislike the grey background. My personal feeling
is that it looked good on a screen or when using a beamer, but not so
good when printed. ggplot's background is lighter, so this probably
does not apply.

> (2) filled points?
>  [I seem to remember seeing somewhere the opposite recommendation
>  for points, i.e. that open points make it much easier to
>  see if there are overlapping values -- and this would
>  be a reason that pch=1 gives an open circle ...]

lattice does have open circles by default, except in ungrouped dot
plots, where there is no possibility of overlapping.

-Deepayan

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: graphics defaults

Prof Brian Ripley
On Fri, 14 Mar 2008, Deepayan Sarkar wrote:

> On 3/13/08, Ben Bolker <[hidden email]> wrote:
>>
>>    Can someone point me to a justification for the design
>>  decisions, which seem to be similar in lattice and
>>  ggplot2, of
>
> Disclaimer: I don't have strong personal preferences, I just went with
> what Trellis had. That said,
>
>> (1) gray backgrounds and
>
> lattice's default background is now white, and this was partly because
> many people seemed to dislike the grey background. My personal feeling
> is that it looked good on a screen or when using a beamer, but not so
> good when printed. ggplot's background is lighter, so this probably
> does not apply.

My memory is that Trellis had different schemes for different devices, so
the background was white for plots intended for a printer.  Also, the
default scheme for postscript() was 'black and white', and few people had
colour printers.

Viewing conditions do matter here.  I remember that in 1992 Trellis' grey
looked horribly dark and muddy on Bill Venables' Sun monitor, something we
were able to alleviate by adjusting it.  But there is dissent about the
gamma to be used on viewing screens and how dark a particular mid grey
appears do depends on the gamma.  [Most use ca 2.2, Macs have always been
different at 1.8, and I believe the SGI systems used at Bell Labs at the
time Trellis was developed were different again.  Beamers (computer
projectors) are often way off in their colour accuracy.]


>> (2) filled points?
>>  [I seem to remember seeing somewhere the opposite recommendation
>>  for points, i.e. that open points make it much easier to
>>  see if there are overlapping values -- and this would
>>  be a reason that pch=1 gives an open circle ...]
>
> lattice does have open circles by default, except in ungrouped dot
> plots, where there is no possibility of overlapping.

There are choices between 'open' and 'closed', and I find using
translucent fills makes overlap easier to detect.  As from R 2.7.0 most
graphics devices are capable of handling semi-transparent colours (at
least on an opaque background, which is what is needed here).

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel