[Met_help] [rt.rap.ucar.edu #79448] History for MET mode map line color

John Halley Gotway via RT met_help at ucar.edu
Thu Feb 16 09:51:28 MST 2017


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Hi,

Attached is plot of MET mode product.

Does anyone know how to change contour and map line colors?

Thanks

Yongzuo


----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: MET mode map line color
From: John Halley Gotway
Time: Wed Feb 15 15:22:24 2017

Yongzuo,

I see you have a question about defining colors in the PostScript
plots
generated by the MODE tool.  The good news is that yes, you do have
some
control over this.

This is mentioned briefly in the met-5.2/data/config/README file.
Search
for "ConfigMapData" in that file.

Next, take a look at this file:
   met-5.2/data/config/ConfigMapData

This defines the defaults for the map data files, line colors, line
width,
and line style information for all of the PostScript plots generated
by the
MET tools.  In that file, line_color, line_width, and line_dash are
defined
once at the top and are applied to each entry in the "source" array.

However, you can move any of them into the entries in the "source"
array to
define them separately for each data source.  For example, you could
make
"country_data" be red and "usa_state_data" be green.

When MODE is run, it reads default map data from the *INSTALLED*
met-5.2/share/met/config/ConfigMapData file.  You can either edit the
default map data settings in there or just cut-and-paste the contents
to
the end of the MODE config file.  Putting it in the MODE config file
will
override the default settings.

As for redefining the blue color used to draw the object outlines,
unfortunately no, that is not configurable.  In met-5.2, it's hard-
coded on
line 39 of met-5.2/src/tools/core/mode/mode_ps_file.cc:
   static const Color BoundaryColor ( 0,   0, 255);

Similarly, the blue color used for unmatched objects is hard-coded on
line
40 of met-5.2/src/libcode/vx_shapedata/engine.h:
   static const Color unmatched_color(0, 0, 255);

You could change those settings, but then you'd need to recompile.
I'm
guessing you'd prefer that they be specified in the MODE config file?

Hope that helps clarify.

Thanks,
John





On Wed, Feb 15, 2017 at 12:54 PM, Yongzuo Li via RT
<met_help at ucar.edu>
wrote:

>
> Wed Feb 15 12:54:19 2017: Request 79448 was acted upon.
> Transaction: Ticket created by yongzuoli79 at gmail.com
>        Queue: met_help
>      Subject: MET mode map line color
>        Owner: Nobody
>   Requestors: yongzuoli79 at gmail.com
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=79448 >
>
>
> Hi,
>
> Attached is plot of MET mode product.
>
> Does anyone know how to change contour and map line colors?
>
> Thanks
>
> Yongzuo
>
>

------------------------------------------------
Subject: MET mode map line color
From: Yongzuo Li
Time: Thu Feb 16 09:45:45 2017

John,

I changed map color to black that is now different from object outline
blue
color.

map_data = {
   line_color = [ 0, 0, 0 ]; // rgb triple values, 0-255

Thanks

Yongzuo

On Wed, Feb 15, 2017 at 5:22 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:

> Yongzuo,
>
> I see you have a question about defining colors in the PostScript
plots
> generated by the MODE tool.  The good news is that yes, you do have
some
> control over this.
>
> This is mentioned briefly in the met-5.2/data/config/README file.
Search
> for "ConfigMapData" in that file.
>
> Next, take a look at this file:
>    met-5.2/data/config/ConfigMapData
>
> This defines the defaults for the map data files, line colors, line
width,
> and line style information for all of the PostScript plots generated
by the
> MET tools.  In that file, line_color, line_width, and line_dash are
defined
> once at the top and are applied to each entry in the "source" array.
>
> However, you can move any of them into the entries in the "source"
array to
> define them separately for each data source.  For example, you could
make
> "country_data" be red and "usa_state_data" be green.
>
> When MODE is run, it reads default map data from the *INSTALLED*
> met-5.2/share/met/config/ConfigMapData file.  You can either edit
the
> default map data settings in there or just cut-and-paste the
contents to
> the end of the MODE config file.  Putting it in the MODE config file
will
> override the default settings.
>
> As for redefining the blue color used to draw the object outlines,
> unfortunately no, that is not configurable.  In met-5.2, it's hard-
coded on
> line 39 of met-5.2/src/tools/core/mode/mode_ps_file.cc:
>    static const Color BoundaryColor ( 0,   0, 255);
>
> Similarly, the blue color used for unmatched objects is hard-coded
on line
> 40 of met-5.2/src/libcode/vx_shapedata/engine.h:
>    static const Color unmatched_color(0, 0, 255);
>
> You could change those settings, but then you'd need to recompile.
I'm
> guessing you'd prefer that they be specified in the MODE config
file?
>
> Hope that helps clarify.
>
> Thanks,
> John
>
>
>
>
>
> On Wed, Feb 15, 2017 at 12:54 PM, Yongzuo Li via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > Wed Feb 15 12:54:19 2017: Request 79448 was acted upon.
> > Transaction: Ticket created by yongzuoli79 at gmail.com
> >        Queue: met_help
> >      Subject: MET mode map line color
> >        Owner: Nobody
> >   Requestors: yongzuoli79 at gmail.com
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=79448 >
> >
> >
> > Hi,
> >
> > Attached is plot of MET mode product.
> >
> > Does anyone know how to change contour and map line colors?
> >
> > Thanks
> >
> > Yongzuo
> >
> >
>
>

------------------------------------------------


More information about the Met_help mailing list