The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to create a contour map of 2D data?
Replies: 1   Last Post: Feb 19, 2013 5:30 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Derek Goring

Posts: 3,922
Registered: 12/7/04
Re: How to create a contour map of 2D data?
Posted: Feb 19, 2013 5:30 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Wednesday, February 20, 2013 10:38:17 AM UTC+13, Maximilian wrote:
> Hi there,
> I have 1000 pairs of angles which I want to plot on a contour map. In the regions with many similar pairs I want to have a certain colour lets say red and in regions with no pairs I want to have a green colour. In addition, I would like to be able to chose myself how many similar pairs are necessary for full red colour and what is still considered as similar.
> Basically the plot should look like this:
> It is basically the same idea as a Ramachandran plot which looks for angle pairs and its occurrence. How is this possible in Matlab? Thank you very much for your help.

You cannot have a 2D contour plot.
By definition it is 3D.
In your case, the 3rd dimension (presumably) is the number of points or the density (i.e. number of points per area unit).
So, if you really want a contour plot, your problem is to figure out how you produce the 3rd dimension.

I assume by "pairs of angles", you actually mean pairs of longitude and latitude?
I'd start by plotting your data in a 2D plot using symbols:
It may be that a contour plot is not what you want, but something like:
help bar3

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.