Thread Subject: Plot Data on US Map

Subject: Plot Data on US Map

From: Niraj

Date: 22 Jan, 2008 13:02:03

Message: 1 of 3

I have a following data:

State, Anamoly, Sales
NC, -200, 10000
...

I want to plot this in a US map as following.
The states should be shaded red or blue depending on whether
the anamoly field is negative or positive. the strength of
the color varies with the magnitude of this field.

I then want to show a circle at the center of each state.
The color of this circle will be different if the "Sales"
field is positive or negative with the size of the circle
depending on the magnitude of the sales.

I used to be able to do this very quickly in excel before
they removed the map functionality.

Can onyone help with the code. I have no experience with
plotting data on maps in Matlab.

Thanks

Subject: Plot Data on US Map

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 22 Jan, 2008 16:47:28

Message: 2 of 3

In article <fn4pgb$jfv$1@fred.mathworks.com>, Niraj <ask@email.com> wrote:
>I have a following data:

>I want to plot this in a US map as following.
>The states should be shaded red or blue depending on whether
>the anamoly field is negative or positive.

patch() with FaceColor

>I then want to show a circle at the center of each state.

patch() or rectangle() (yes, rectangle() is used for drawing circles!)
--
   So you found your solution
   What will be your last contribution?
   -- Supertramp (Fool's Overture)

Subject: Plot Data on US Map

From: Niraj

Date: 23 Jan, 2008 14:05:03

Message: 3 of 3

Thanks for your response. Can you be proide some more help?
Mabe a small snippet of code that does this? How do i plot
the us map to begin with and then shade the color accoridng
to value and the size of circles according to values?

Thanks


roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <fn56n0$e7a$1@canopus.cc.umanitoba.ca>...
> In article <fn4pgb$jfv$1@fred.mathworks.com>, Niraj
<ask@email.com> wrote:
> >I have a following data:
>
> >I want to plot this in a US map as following.
> >The states should be shaded red or blue depending on whether
> >the anamoly field is negative or positive.
>
> patch() with FaceColor
>
> >I then want to show a circle at the center of each state.
>
> patch() or rectangle() (yes, rectangle() is used for
drawing circles!)
> --
> So you found your solution
> What will be your last contribution?
> -- Supertramp (Fool's Overture)

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com