![gnu octave scaling axes gnu octave scaling axes](https://ramblingacademicdotcom.files.wordpress.com/2016/04/matlab_plot_5.jpg)
On most systems, this command will open a separate plot window to display the graph.
![gnu octave scaling axes gnu octave scaling axes](https://pjakma.files.wordpress.com/2013/12/ba-model-min-degree_dists.png)
For example, x -10:0.1:10 plot (x, sin (x)) displays a sine wave shown in Figure 15-1. I need to tidy this up a little more to make it convenient. The plot function allows you to create simple x-y plots with linear axes. This approach may also work in MATLAB, but I haven't tried that yet. It also makes the left axis the same color as the line that was already there. I've been experimenting with plotting phasor diagrams in GNU Octave.
#Gnu octave scaling axes code
So this code first preserves the location of the tick marks and the limits, and then applies those again after plotting. It turns out that adding this dummy plot still causes the left axis to change. here is my code : ydata load ('data.txt') x linspace(1,2048,2048) plot(x,ydata(:,1)) this figures the x-axis with maximum value of 2500. Here we use hold on to prevent the current data from being deleted, then plot the new data with plotyy that also adds a dummy plot to the left axis (a single point 0,0). I want to plot a graph in octave in which the x-axis maximum value is 2048, and the they start with 0 and increment by 100. It isn't smart enough to know it could expand out the visual range and zoom a bit even if that means it has to offset (in this case) the y axis, whereas Qt toolkit at least makes better use of the. The manner in which gnuplot works is that it centralizes the figure. Preserve existing axes and plot, add a second axis with the new data With 'equal' scaling on all axes, the 0,0.01 range is 1/100 the x scale. Plotyy(ax,x1,y1,x2,y2) % Plot old and new data H0 = get(ax,'children') % This is the handle to the plotted line We then plot a new figure using plotyy that contains the old data and the new data. Here we retrieve the data from the current axes (it would be better if you preserved the axes handle from when you made your first plot, of course). Replot the figure, adding new data in second axis Let's start with some random data plotted normally: % Initial graph I've tested these in MATLAB, but I'm pretty sure it'll work in Octave the same way.