Re: pslegend justification: not sure if bug or feature
Remko Scharroo <[email protected]> Sat, 26 Apr 2014 19:45:18 +0200
| Newsgroups | gmane.comp.gis.gmt.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Kristof, On 26 Apr 2014, at 00:59, Kristof Koch <[email protected]> wrote: > > Dear list, > > I'm (ab)using pslegend to plot tabulated data on some charts. Using BL as justification, everything works as expected. However changing the justification to TL, the dy values seem to be inverted. See attached cropped screenshot. > > Expected result would have been the red box just beneath the green box, overlapping the lower left corner of the green box with the upper left corner of the red box at the current position of the green box. Well, in fact, I would have expected the red box beneath the green box, so that the that the lower side of the green box overlaps the upper side of the red box. Nonetheless, I think we expected the same, that the anchor point (0.5c/0.5c) is always upward and right. However, the manpage for pslegend says this: “Finally, you can offset the legend box by <dx/dy> away from the anchor point in the direction implied by <justify>.” Now, I honestly do not know what direction “<justify>” would imply. Apparently this is meant to mean that if you have “TL/0.5c/0.5c", the anchor point is up and to the right. But I’m not so sure everyone would agree that this is what “TL implies”. But apparently this also means that “BL/0.5c/0.5c” then the anchor point is down and to the right. > I'm not sure if this is a bug or a feature as man pslegend states: "Use to optional dx/dy to shift the legend by that amount in the direction implied by the justification." I attached a small testcase. I’m running GMT Version 5.1.1_r12890 [64-bit]. For the above, it appears that it is a FEATURE, but I fully agree that it is a very poorly worded feature, and I also do not think that anyone would EXPECT, let alone WANT it to work that way. Granted, it is practical if you want to put a bunch of boxes around a single symbol then TL/0.5c/0.5c, BL/0.5c/0.5c, TR/0.5c/0.5c, BR/0.5c/0.5c will all have their corners 1 cm apart, with the symbol at the center of the 4 corners. Regards, Remko To unsubscribe, send the message "signoff gmt-help" to [email protected]