how can i make figure longer on the x-axis and y-axis

6 views (last 30 days)
Using command importdata to import a file. This returns a a matrix that has the size of n times 4, where n is the length of measurement in samples.
data = importdata([files_path 'part1_relax_volumes.txt']); data = data.data; %sampling frequency fs=500; %Copy the colum 4 into a new variable named volume. volume=data(:,4); %time vector t = 0:1/fs:(size(volume,1)-1)/fs; hf = figure; hf.Position = [0 0 570*2 466*2 ]; %makes figure longer on the x-axis and y-axis
plot(t,volume); ylabel('volume(L)') xlabel('t(s)') grid on;

Answers (1)

Adam
Adam on 15 Dec 2017
doc pbaspect
doc daspect
both affect data plotting aspect ratio, if that is what you are asking, but you didn't really ask a clear question.
  2 Comments
sudeb saha
sudeb saha on 15 Dec 2017
i do not understand how can i figure plot volume along time t with this code: hf = figure; hf.Position = [0 0 570*2 466*2 ];
Adam
Adam on 15 Dec 2017
I don't know why you specially want that code. That sets the size of the figure to 1140 by 932. The axes will resize in the same ratio inside it. Is that what you want? If not explain what you do want.

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!