axis square
Ben Abbott
bpabbott at mac.com
Mon Mar 9 11:05:06 CDT 2009
On Mar 9, 2009, at 11:35 PM, Marco Caliari wrote:
> On Mon, 9 Mar 2009, Ben Abbott wrote:
>
>>
>> On Mar 9, 2009, at 10:48 PM, Marco Caliari wrote:
>>
>>>>>>> Dear maintainers,
>>>>>>> the enclosed patch (against 3.1.54) makes "axis square" to
>>>>>>> behave in a compatible way and as described in the
>>>>>>> documentation. I also modified the demo, since "axis normal",
>>>>>>> "axis square", "axis equal" should appear after a plot command
>>>>>>> in order to take effect (this is also a compatible behaviour).
>>>>>>> Please consider to apply this patch.
>>>>>>> Best regards,
>>>>>>> Marco<axis.m.patch>
>>>>>> Marco,
>>>>>> If I understand correctly, the "square" and "equal" options
>>>>>> need to be switched.
>>>>> Dear Ben,
>>>>> I don't think so. If you use "axis square" it means you want the
>>>>> plot in a square box.
>>>> Ok, we have the same understanding of what "square" should do.
>>>> With the changeset I've attached, and applied to the current
>>>> developers sources, the first demo produces the image at the link
>>>> below.
>>>>
>>>> http://www.picturehosting.com/gallery.php?g=axis&u=bpabbott&i=icture1.png
>>>> Is the image at the link consistent with your understanding?
>>> Yes, and with ml.
>>> Marco
>>
>> Ok, please look over the changeset. If it looks good to you (I'll
>> test it a bit more as well), I'll push it.
>
> Dear Ben,
>
> your picture is fine for me. But if I apply your changeset to
> 3.1.54, then I get the picture here
>
> http://157.27.10.252/~caliari/picture.png
>
> which is wrong. Maybe other changes have occured after 3.1.54 that I
> am not aware of. By the way, I am using gnuplot 4.2.4.
>
> Cheers,
>
> Marco
ouch!
I get the same with 4.2.3. The prior image I posted was generated
using 4.3.x (developers sources).
I should have guessed what the problem was. Using 4.3 the plot box
extents are controlled via gnuplots {lbrt}margin. For prior versions
it is controlled by "set origin ..." and 'set size ...".
I suggest that axis.m be changed to modify its behavior depending upon
the version of gnuplot being run. You can use the function call below.
__gnuplot_has_feature__ ("screen_coordinates_for_{lrtb}margin")
This will be true for gnuplot versions > 4.3.0 and false otherwise.
Its midnight where I am, so I'll check back tomorrow.
Ben
More information about the Octave-maintainers
mailing list