Q:

plotting a text file with 4 columns in matlab

I want to plot a text file with 4 columns that first column in longitude,second in latitude, third is depth and forth is amount of displacement in each point.(it's related to a fualt)
-114.903874    41.207504     1.446784    2.323745
I want a plot to show the amount of displacement in each point (like images that we plot with imagesc),unfortunately "imagesc" command doesn't work for it.
how can I plot it?
Thanks for your attention

A:

A simple way would be to use scatter3 and assign your displacements to be the colours.  Note that you have to supply a size for this to work - I'm using [] (empty matrix) which will set it to default.  If your four sets of values are four vectors of the same size, then it's just something like:
scatter3(lat,lon,depth,[],displacement, 'filled')

Values in displacement will be linearly mapped to the current colormap.  'filled' gives you filled markers rather than open ones (default marker is a circle but can be changed).

