Continuing the discussion of DISLIN as a solution, with an answer that does not fit into the comment ...
@M. S. B. - hello. I apologize for the letter in your answer, but these comments are too short, and the answer to the question in the form of an answer with an answer is ... anyway ...
There is a Quick Plot function for DISLIN - only three arguments are required to execute the QPLOT curve: array X, array Y and number N. See chapter 16 of the manual. Plus only a few additional calls for selecting an output device and marking axes. I have not used this, so I do not know how good autoscaling is.
Yes, I know Quickplot and its related routines, but it is too functional for my needs (I can’t change anything), and yes, this autoscaling is a bit strange. In addition, the fields inside the graph are too large.
Or, if you want to use the power of GRAF to customize your graph, there is a GAXPAR routine for automatically creating recommended values. -2, because the first argument LABDIG automatically determines the number of digits in the label labels.
Have you tried routines?
Sorry, I cannot find the GAXPAR procedure that you specified in the dislin index. Are you sure this is called that?
MSB Answer : Yes, I'm sure of writing GAXPAR. This is the last procedure in chapter 4 of the DISLIN 9.5 PDF manual. Perhaps this is a new routine? There is also another way to auto-scale: SETSCL - see Chapter 6.
So far, what I have been doing (except for some duck tape solutions)
use dislin; implicit none real, dimension(5) :: & x = [.5, 2., 3., 4., 5.], & y = [10., 22., 34., 43., 15.] real :: xa, xe, xor, xstp, & ya, ye, yor, ystp call setpag('da4p'); call metafl('xwin'); call disini(); call winkey('return'); call setscl(x,size(x),'x'); call setscl(y,size(y),'y') call axslen(1680,2376) !(8/10)*2100 and 2970, respectively call setgrf('name','name','line','line') call incmrk(1); call hsymbl(3); call graf(xa, xe, xor, xstp, ya, ye, yor, ystp); call curve(x,y,size(x)) call disfin() end
which puts extreme values ​​right on the axis. Do you know, maybe, how I can get one “extreme marker” on the outside to put some area between the curve and the axis (while preserving the effects of setscl)?
Even if you don’t like the built-in autoscaling, if you are already using DISLIN, speeding up your own autoscaling will be easier than calling Fortran from MATLAB. You can use the built-in Fortran minval and maxval functions to find the smallest and largest values ​​in the data than write a routine to round it to “good” round values. Similarly, a subroutine defines a tick interval.
This is actually not so easy to do (and ideas to prove that I'm wrong will be appreciated). Or should I say that this is easy if you know the approximate range in which your values ​​will lie. But if you do not, and you do not know whether your values ​​will be in the range 13-34 or 1330-3440, then ...
... if I am on the wrong track all the way here, please explain if you are something else. My English is somewhat lacking, so I can only hope that the above is understandable.
Inside the routine for determining the start / end values ​​of a round, you can always scale the actual min / max values ​​from 1 to 10, and then have a table to select good round values, and then drop them back to the desired range.
-