help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: Scoping x and y limits simultaneously

 From: Fritz Sonnichsen Subject: Re: Scoping x and y limits simultaneously Date: Fri, 9 Jun 2017 15:08:34 -0400 User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

 Thanks for the reply. I was assuming the more common case of an increasing x. In general the domain for a given range is deterministic. My reason for avoiding the subset method was simply that I am dealing with large datasets and I assume that Octave actually copies the selected records into the new variable. thanks again fritz On 6/9/2017 2:13 PM, Kire Pudsje wrote: On Fri, Jun 9, 2017 at 7:07 PM, Fritz Sonnichsen wrote: I am processing a rather large dataset and want to create and zoom various plots. I am easily able to zoom the x axis using the axis([x1 x2]) type command. However when I do this I need to re-normalize the y limits to fill the plot.       At present I have a rather lengthy script that finds the min and max y values within the new range , retrieve their indices,  and then divides all the y values. However I was thinking there is a better way to do this as such: data="">s\gases\spectra\testdata.csv'); plot(data(:,1),data(:,2)); axis([20 30]); ylim auto This does not work. The "auto" mandate scopes the y across the complete range, not just the scoped down range. Is there a way to do this without my scripts? I think it would be hard to implement in a generic way, since although most plots use a monotonic increasing x-axis, this does not have to be the case. Also if the limits of x and y are not aligned with the data, the intersection of all segments that cross the limits should be interpolated. Why not just create plots with a subset of the data? ss=(20 <= data(:,1)) & (data(:,1) <= 30); plot(data(ss,1), data(ss,2));

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]