NOAA-PMEL/PyFerret

contour labels not getting line color with system font

Opened this issue · 2 comments

set data coads_climatology
contour/l=1/color=red SST
set text/font=LucidaGrande/isiz=3
contour/l=1/color=red SST

The contour lines are red whereas the contour labels remains black. An obvious workaround is

set text/font=LucidaGrande/isiz=3/color=red
contour/l=1/color=red SST

You could argue that this is desirable because you can control the line colors and label colors independently. On the other hand, the behavior isn't consistent with Hershey font.

I agree that the default behavior should be that the contour labels should change color when a color is given with CONTOUR/COLOR=

The best way to handle this as things stand now is with a separate setting for the contour labels using the "text group" setting for contour labels. (https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/SET#_SETTEXT_BOLD). This way the remaining text on the page remains black and only the contour labels are done in red.

set text/font=LucidaGrande/isiz=3
set text/color=red contour
contour/L=1/color=red sst

The text group setting inherits any general settings, and changes any characteristics that are set explicitly.

(edited to fix a missing / in the example)

This is fixed in xeq/xeq_contour.F

If we have used SET TEXT to use PyFerret fonts, and if there is not a specific setting for the contour-labels, then the contour label color will now match the color of the contour lines.

This ticket can be closed.