Hey, I've just tried to use the new optional extents feature of ManualScale. I am trying to specify y axis extents while leaving the x axis alone. Dplot seems to ignore the manual scale commands that leave some extents unassigned. I am using 2.0.1.1. Dplot obeys manual scale extents fine when they're given for both axes.
Here is the command that doesn't work [ManualScale(,0,,40)]
Here's a command that does work [ManualScale(5,0,30,40)]
Don't know what's up. I checked the revision history page and noticed that the version that introduced this functionality is 2.0.1.0, while the version I have is 2.0.1.1. Could this be the reason?
Thanks for any help,
Arthur
Issue with optional extents specification
Moderator: DPlotAdmin
-
- Posts: 30
- Joined: Fri Jul 15, 2005 9:18 am
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
That should work. I tried an example just now and it performed as advertised.
As with the corresponding menu command, it might also be necessary to specify the tick mark interval used for the Y axis. Otherwise DPlot will pick an interval and change (if necessary) the specified extents to a multiple of the interval.
As with the corresponding menu command, it might also be necessary to specify the tick mark interval used for the Y axis. Otherwise DPlot will pick an interval and change (if necessary) the specified extents to a multiple of the interval.
Visualize Your Data
support@dplot.com
support@dplot.com
-
- Posts: 30
- Joined: Fri Jul 15, 2005 9:18 am
One: it seems that the order I place the manualscale command within the command string affects the outcome. When the command [ManualScale(,0,,50)] is at the beginning, the extents are still set by the program, if it's at the end, the optional extents are used. I haven't pinpointed which command it needs to come before, though. Any ideas as to what is conflicting? I'll send the command string in a later email.
Two: I got it working in the end, but something I've noticed is that the DPlot sets extents differently if it has control of all the extents than it does if it just sets some of them. Specifically, the spacing DPlot gives the graphs that it sets all the extents for is looser, giving a border between the plot and the edge of the graph. This border seems to be absent when some extents are left optional.
Example:
I entered data manually for a graph with the following points...
(1,2)(2,1)(3,4)(4,3)(5,5)
The extents DPlot chose are as follows...
xlo ylo xhi yhi
.8 .6 5.2 5.4
When I send DPlot the command [ManualScale(,0,,6)] I would expect the x extents to remain .8 and 5.4 and the y extents to be 0 and 6.
The y extents are changed to 0 and 6, but the x extents lose their spacing and become 1 and 5.
Any ideas what's going on?
Thanks so much for all of your help and this incredible program.
Arthur
Two: I got it working in the end, but something I've noticed is that the DPlot sets extents differently if it has control of all the extents than it does if it just sets some of them. Specifically, the spacing DPlot gives the graphs that it sets all the extents for is looser, giving a border between the plot and the edge of the graph. This border seems to be absent when some extents are left optional.
Example:
I entered data manually for a graph with the following points...
(1,2)(2,1)(3,4)(4,3)(5,5)
The extents DPlot chose are as follows...
xlo ylo xhi yhi
.8 .6 5.2 5.4
When I send DPlot the command [ManualScale(,0,,6)] I would expect the x extents to remain .8 and 5.4 and the y extents to be 0 and 6.
The y extents are changed to 0 and 6, but the x extents lose their spacing and become 1 and 5.
Any ideas what's going on?
Thanks so much for all of your help and this incredible program.
Arthur
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I think you've uncovered a bit of a problem. If you leave out an extent in the ManualScale command then the data extents are used. But... if under Options>General you have "Recalculate extents of XY plots after hiding/unhiding curves" checked, then when hiding ALL curves (as you're doing with [HideCurve(0)]), then Xmin=Xmax, which DPlot won't like for manually-entered extents. So your ManualScale settings end up being wiped out. At least that's what should happen, but it should happen just the opposite of how you've described.One: it seems that the order I place the manualscale command within the command string affects the outcome.
Short version is I need to look into this more.
This will be dependent on the aspect ratio of the plot, which is dependent on the size of the document window and/or whether you've used "Specify plot size". The default X extents will always be 0.8-5.2. DPlot finds a Y interval that gives roughly the same physical distance between tick marks on the Y axis as those for the X axis. So you might get 0.6-5.4 with an interval of 0.6, or you might get 1-5 with an interval of 0.5.Example:
I entered data manually for a graph with the following points...
(1,2)(2,1)(3,4)(4,3)(5,5)
The extents DPlot chose are as follows...
xlo ylo xhi yhi
.8 .6 5.2 5.4
Off the top of my head I think I should probably make default intervals a bit more restrictive, say 1, 2, or 5 x some power of 10. I'll have to give this some thought.
Visualize Your Data
support@dplot.com
support@dplot.com