필터 지우기
필터 지우기

Plotting 4 column of data

조회 수: 7 (최근 30일)
reza
reza 2013년 3월 25일
Hi everybody
I have obtained 4 column of data from an experiment. They are X, Y, Z as positions and d as density.
This density is the electron density around an atom.
I want to plot this data in such a way that d represents the color and wherever d is low, there is light color and wherever d is high, there is a dark color.
I imported the data to matlab and selected surf function but the 3d curve is very inaccurate and ugly :D
How can I plot such a curve? I am a beginner in matlab by the way.
Thanks :)
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 3월 25일
Are the X, Y, Z regularly spaced, or are they irregular? Is there only one Z per (X,Y) combination ?

댓글을 달려면 로그인하십시오.

답변 (3개)

Ilham Hardy
Ilham Hardy 2013년 3월 25일
Hi reza,
How do you define the very inaccurate and ugly graph? can you post the resulted graph? By the way dou you need curve or 3d-shaded surface? If you need the latter, surf is the correct choice.
See more documentation of the surf, by typing doc surf in you rcommand window..
See also..

reza
reza 2013년 3월 25일
I need clouds. The density of electrons are like clouds around atoms. My data should result in several clouds in the XYZ cordination. d is in fact the color of these clouds.
This is what I got and is not what I want.
X, Y and Z are irregularly spaced.
Thanks

Kelly Kearney
Kelly Kearney 2013년 3월 25일
Try scatter3. Assuming data is your n x 4 matrix:
scatter3(data(:,1), data(:,2), data(:,3), [], data(:,4), 'filled');
  댓글 수: 17
reza
reza 2013년 3월 25일
I reversed the colormap and it turns to orange instead of blue. That's it. Nothing more happened.
Right now the min and max of the axes are 0-20 0-40 and 0-60.
I have 268000 points with (XYZd)
When I zoom in, it is not solid line but it consists of very small dots which are very close to each other.
Walter Roberson
Walter Roberson 2013년 3월 26일
What is min() and max() of the d data?
Try using the rotate to move the image around. The solid-looking background: does it turn out to be organized into planes, more or less? If you pan to move the edges into or out of view, does a "wall" disappear?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by