Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Heatmaps


From   Keith Dear <[email protected]>
To   [email protected]
Subject   Re: st: Heatmaps
Date   Tue, 8 Mar 2011 18:49:25 +1100

They don't.
-tddens- has an option Gridpoints that defaults to 40, and playing
with it shows that the squares roughly abut for g=30, not 40.
g<30 leaves gaps (and demonstrates a famous optical illusion).
It's interesting that it still seems to work well with g>30, even
though the squares must overlap, which I suppose distorts the image.

clear all
set obs 1000
g x=rnormal(0,1)
g y=(x+rnormal(0,1))/sqrt(2)
drop if abs(x)<1 & abs(y)<1
tddens3 y x, g(24) bw(.01)

Keith


On 7 March 2011 10:56, Brendan Halpin <[email protected]> wrote:
> On Sun, Mar 06 2011, Keith Dear wrote:
>
>> Take a look inside Austin Nichols's very clever -tddens- (-findit- finds it).
>
> Almost unreadable at first glance but indeed very clever. I see the main
> idea (round your Z variable, and overlay scatterplots of X and Y for
> each level of rounded Z, with direct control of the colour via the
> mcolor option -- that will allow Stata to do anything,
> colour-palette-wise, that gnuplot can).
>
> What I can't see is how the code makes the square scatterplot symbols
> abut exactly.
>
> Brendan
> --
> Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland
> Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F1-009 x 3147
> mailto:[email protected]  http://www.ul.ie/sociology/brendan.halpin.html
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>



-- 
Dr Keith Dear
National Centre for Epidemiology and Population Health
ANU College of Medicine, Biology and Environment
Australian National University
Canberra, ACT 0200 Australia
CRICOS provider #00120C
Phone +61 (02) 6273 2208
Mobile 0424 450 396

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index