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

contours plot clean up #3

Open jbfaden opened 3 years ago

jbfaden commented 3 years ago

A low-priority and fun project would be to clean up the contours plot. With recent changes to the tick specification, I realized I ought to support major and minor contours. +20/4 would draw a major contour every 20 units, with lighter and unlabelled minor contours at 5,10, and 15 units past. (This is refered to as (1) below.)

(2) Also, the labels for each contour need to be oriented so that the length of the name will be aligned with the contour. See the attached plot to see the arbitrary orientation of each contour because of noise which is much higher frequency(<1px) than the label (30px).

jbfaden commented 3 years ago

20210505_121423

jbfaden commented 3 years ago

(3) Also if contour labels are to be placed every 100 px, the contours are placed exactly 100 px apart. The circuit length should be considered, so if the total length around a contour is 440 px, then each label should be shifted so that they are a uniform 110px apart.

jbfaden commented 3 years ago

Now circuits are detected and the label distance is adjusted to make the layout nice.