graphical distance matrix

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

graphical distance matrix

eliza botto

Dear R-family,
I made a distance matrix of about 2000 stations. its extremely hard to visualize the details of that matrix. I heard that there is a way in R to represent the details of distance matrix graphically. more precisely, different sections of our distance matrix can be presented in different colors. low values be presented in light colors and high values in dark. is there really a way of doing it??
thanks in advance
regards
elisa    
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: graphical distance matrix

Jim Lemon
On 01/10/2013 07:50 AM, eliza botto wrote:
>
> Dear R-family,
> I made a distance matrix of about 2000 stations. its extremely hard to visualize the details of that matrix. I heard that there is a way in R to represent the details of distance matrix graphically. more precisely, different sections of our distance matrix can be presented in different colors. low values be presented in light colors and high values in dark. is there really a way of doing it??
> thanks in advance
> regards
> elisa  

Hi elisa,
In the example for the function "color.scale.lines" (plotrix) you will
find one method of coloring something (lines in this case) depending
upon the distance from something else (the starting point). With
judicious modification, I think it might do what you want.

Jim

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: graphical distance matrix

Mark Difford
This post has NOT been accepted by the mailing list yet.
In reply to this post by eliza botto
On Jan 09, 2013; 10:50pm eliza botto wrote:

> I heard that there is a way in R to represent the details of distance matrix graphically. more precisely, different sections of
> our distance matrix can be presented in different colors.

There are quite a few ways of visualizing the matrix directly (as opposed to visualizing it by projecting it onto a lesser number of dimensions using metric/non-metric multidimensional scaling). A heatmap (see ?heatmap) would be a good starting point. See http://stackoverflow.com/questions/3081066/what-techniques-exists-in-r-to-visualize-a-distance-matrix for other leads.

Regards, Mark.
Mark Difford (Ph.D.)
Research Associate
Botany Department
Nelson Mandela Metropolitan University
Port Elizabeth, South Africa