Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

2d graph with 3rd dimension represented as color???

Status
Not open for further replies.

windint

Mechanical
Dec 13, 2006
1
I want to plot a 2d graph of data points, but as I have millions of points the graph comes out as a blob of color. What I have done is created a matrix where the third vector is # of occurances. I want to use this third column and plot the graph again in 2d with the third dimension being color corresponding to the number of occurances of different data points.... anyone that can help??

Thanks, T
 
Replies continue below

Recommended for you

If your 2d data is based on a square grid, you can try to convert your color column into a matrix with the location of each element corresponding the position on the square grid. i.e, a=[1,1,0;1,2,1;2,1,2;2,2,3] corresponds to [0,1;2,3]. then CONTOUR plotting.
 
Actually, my question is that I never know how to deal with cases outside square grids. Would anyone help me if I want to plot another grid? For example, a triangular grid, with the first 2 columns as (x,y) and the 3rd as some kind of intensity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor