0
votes

I have the following image which I want to have the depth axis range like below : (10 9.5 9 8.5 8 7.5 7 6 5 3 2 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0) to show the data between depth 1 and 0 in larger scale, and I have the following code

depths = [10 5 1 0.5 0; 10 5 1 0.5 0] % these are the real depths in meter
contourf(points,depths,RFU15102013_BloomAsMainPoint);
set(gca, 'XTick', points(1) : points(2), 'XTickLabel',{ 'LSB1', 'LSB2'});
ylabel('Depth(m)');
xlabel('Points');
title('Date: 15.10.2013');

this is the image : enter image description here

how can I do that?

EDIT1

Real Data:

RFU15102013_BloomAsMainPoint = [ 2.71 1.23 1.30 1.20 14.37 ; 2.51 1.36 1.01 1.24 1.15];

points = [1 1 1 1 1; 2 2 2 2 2 ];

depths = [10 5 1 0.5 0; 10 5 1 0.5 0];

2
@divanov , you mean contourf inputs?? - Paridokht
@divanov, I've just added the data you asked for. - Paridokht
I've updated my answer with the data you provided. - divanov

2 Answers

1
votes

As most of a data changes around zero it could be enough to change scaling of Y axis. Here is an example

close all; clear all;

z = [ 2.71 1.23 1.30 1.20 14.37 ; 2.51 1.36 1.01 1.24 1.15];
x = repmat([1; 2], 1, 5);
y = repmat([10 5 1 0.5 0], 2, 1);

% plotting with equally spaced y-s
h = subplot(1,2,1);
contourf(x,y,z);

y2 = log(y + 0.25);
yTicks = linspace(min(y2(1,:)), max(y2(1,:)), 10);

% plotting with logarithmically spaced y-s
h = subplot(1,2,2)
contourf(x,y2,z);
set(h,'YTick', yTicks)
set(h,'YTickLabel', exp(yTicks) - 0.25);

print('-dpng','scaling.png')

The result contour plot

This way any monotonic continuous function for axis scaling can be applied.

0
votes

You could use UIMAGE - UIMAGESC from the mathworks file exchange and set the y values to emphaisize points in 1 to 0 range.