I did it like this. It works properly.
% Setting my image and related params
img = imread('C:/plan/plan.jpg');
imshow(img)
min_x = 0;
max_x = 7;
min_y = 0;
max_y = 3;
imagesc([min_x max_x], [min_y max_y], img);
data = loadjson('C:/data/default.json');
count_data = sum(cellfun(@(x) numel(x),data.Location));
for i=1:count_data
hold on;
x = cellfun( @(cellElem) cellElem.locationX, data.Location );
y = cellfun( @(cellElem) cellElem.locationY, data.Location );
plot(x(i), y(i), 'ro', 'MarkerSize', 5); %point
plot([x(i) x(i+1)],[y(i) y(i+1)],'r') %line
end

