das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

DasAxis titles are not positioned properly if tick labels occupy more than one line #78

Closed DiamondJim87 closed 1 year ago

DiamondJim87 commented 1 year ago

This follows on from issue #77. The space seems to be computed correctly, but the title position does not account for the taller labels. For example, if using a time axis, try the format string "%y-%j!c%H:%M" (note the "!c" in the middle of that which splits the date/time onto two lines). The result should look something like the attached screen shot.

Screenshot 2023-08-22 at 10 43 11 AM
jbfaden commented 1 year ago

Indeed... Usually we have the first tick with the date, and this is why the bug remains. The code should look for the format property and shift down the title if necessary.

jbfaden commented 1 year ago

This is corrected, so now if the format property is set then "blLabelRect" is used to recalculate the offset needed.

image