For now, run ./tests/scripts/.abi.static.Infrared.imagery_annotated_enhanced.sh and get an output of 0.
You can also run ./tests/integration_tests/full_test.sh as this bash script now includes the new test added.
Summary
This enhancement updates feature / gridline -annotator yaml plugins and imagery-based
module plugins to enhance the plotting configurability we can control as users within
GeoIPS. It adds quite a few new attributes which we can use to control our plotting
output. This includes:
Background color for data over the map-portion of the image (feature_annotator)
Background color for the frame-portion of the image (gridline_annotator)
x label offset (gridline_annotator)
y label offset (gridline_annotator)
font family for labels (gridline_annotator)
font style for labels ('italic', 'normal', 'oblique') (gridline_annotator)
font weight for lablels (a numeric value in range 0-1000, 'ultralight', 'light',
'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi',
'bold', 'heavy', 'extra bold', 'black') (gridline_annotator)
font size for labels (float or {'xx-small', 'x-small', 'small', 'medium', 'large',
'x-large', 'xx-large'. Defaults to matplotlib.pyplot.rcParams['font.size'])
(gridline_annotator)
To change the background of a frame, all you need to do is add a
background: <mpl_color_name_or_hexadecimal_string> property within your gridline_annotator plugin. To
modify the background color of the mapped portion of the image, you'll add the same
section to your feature_annotator.
To change the offset of the labels for applicable imagery outputs, all you need to do is
add an xpadding: <pixel_offset_int> and/or a ypadding: <pixel_offset_int> to the
labels portion of your gridline annotator. Using this information, we will adjust
the offset of your tick labels to the desired position.
To modify the font-based aspects of labels, you can do any of the following:
fontfamily: <font_name>
fontstyle: <style_name>
fontweight: <int_or_weight_name>
fontsize: <float_or_size_name>
For examples of these new features, look at feature_annotator: default_oldlace and
gridline_annotator: default_palegreen.
Here is an example of new feature / gridline -annotator plugins used to create imagery output products with modified backgrounds and offset labeling.
default_oldlace feature_annotator
interface: feature_annotators
name: default_oldlace
family: cartopy
docstring: |
The default_oldlace feature_annotators plugin. All line types enabled. All colored
red. 2px coastlines, 1px countries, 0.5px states borders, and 0px rivers. oldlace
background color.
spec:
coastline:
enabled: true
edgecolor: red
linewidth: 2
borders:
enabled: true
edgecolor: red
linewidth: 1
states:
enabled: true
edgecolor: red
linewidth: 0.5
rivers:
enabled: false
background: oldlace
default_palegreen gridline_annotator
interface: gridline_annotators
family: cartopy
name: default_palegreen
docstring: |
The default_palegreen gridline_annotators plugin. Top and left gridline labels
(offset 50 px), latitude and longitude lines colored black, auto spacing, 1px
linewidth, and [4, 2] linestyle. palegreen background color.
spec:
labels:
top: true
bottom: false
left: true
right: false
xpadding: 50
ypadding: 50
fontfamily: 'URW Bookman'
fontstyle: oblique
fontweight: demibold
fontsize: 50
lines:
color: black
linestyle: [4, 2]
linewidth: 1
spacing:
latitude: auto
longitude: auto
background: palegreen
New Output
You can also use negative numbers for xpadding and ypadding which will offset the labels into the map-portion of the imagery. In the example below, we set xpadding and ypadding to -15.
Reviewer Checklist
Related Issues
fixes NRLMMD-GEOIPS/geoips#259 fixes NRLMMD-GEOIPS/geoips#147
Testing Instructions
For now, run
./tests/scripts/.abi.static.Infrared.imagery_annotated_enhanced.sh
and get an output of 0. You can also run./tests/integration_tests/full_test.sh
as this bash script now includes the new test added.Summary
This enhancement updates feature / gridline -annotator yaml plugins and imagery-based module plugins to enhance the plotting configurability we can control as users within GeoIPS. It adds quite a few new attributes which we can use to control our plotting output. This includes:
To change the background of a frame, all you need to do is add a
background: <mpl_color_name_or_hexadecimal_string>
property within your gridline_annotator plugin. To modify the background color of the mapped portion of the image, you'll add the same section to your feature_annotator.To change the offset of the labels for applicable imagery outputs, all you need to do is add an
xpadding: <pixel_offset_int>
and/or aypadding: <pixel_offset_int>
to thelabels
portion of your gridline annotator. Using this information, we will adjust the offset of your tick labels to the desired position.To modify the font-based aspects of labels, you can do any of the following:
fontfamily: <font_name>
fontstyle: <style_name>
fontweight: <int_or_weight_name>
fontsize: <float_or_size_name>
For examples of these new features, look at
feature_annotator: default_oldlace
andgridline_annotator: default_palegreen
.Output
Here is an example of new feature / gridline -annotator plugins used to create imagery output products with modified backgrounds and offset labeling.
default_oldlace feature_annotator
default_palegreen gridline_annotator
New Output
You can also use negative numbers for![20200918 195020 goes-16 abi Infrared goes_east labels_inside](https://github.com/NRLMMD-GEOIPS/geoips/assets/62626811/881a4a03-dbc0-4a44-9a0e-59d226490d63)
xpadding
andypadding
which will offset the labels into the map-portion of the imagery. In the example below, we setxpadding
andypadding
to-15
.