Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section


Column
width60%


Panel

  mcont ( macro/python ) pcont ( fortran )


Contouring is achieved by calling the action routine pcont, i.e. call pcont . The call may be preceded by one or more calls to Magics parameter setting routines. pcont will only take into account those parameters set before the routine is called. Any calls to Magics parameter setting routines after pcont is called are only relevant to future action routines.

When the action routine pcont is called, it will plot contours based on the input data supplied and according to the user's instructions. The input data may have different organizations: GRIB code data, regular latitude/longitude grid, gaussian grid. Before pcont is called, the user must define how he wants the data to be contoured, i.e. location of the data, dimensions of the array, input field organization etc. This is done by calling Magics parameter setting routines. Data may be passed in an array, in GRIB or NetCDF format


Panel
titleNew in 3-0.0 : Improvment of the gradient colours settings

This version comes with a more complete implementaion of the gradients colour setting.

This method can be used to create a list of colours giving a smooth transition between 2 colours. 

The main control parameters of this new technique are shown in this small example.

contour_level_list = [-15,-0.5, 0.5,15]

contour_shade_colour_method = "gradients",

contour_gradients_colour_list = ['blue','white', 'red'],

contour_gradients_step_list = [50, 1, 50]

This setting will create the following list of colours : 50 colours between -15 and -0.5, 1 between -0.5 and 05 and 50 between 0.5 and 50.

Code Block
languagepy
collapsetrue
contour = mcont(contour = "off",
                     legend = "on",
                     contour_shade = "on",
                     contour_level_selection_type = "level_list",
                     contour_level_list = [-15.00, -0.5, 0.5, 15.00],
                     contour_label = "off",
                     contour_label_height = 0.40,
                     contour_label_colour = "charcoal",
                     contour_label_frequency = 1,
                     contour_shade_method = "area_fill",
                     contour_shade_colour_method = "gradients",
                     contour_gradients_colour_list = ['blue','white','white', 'red'],
                     contour_gradients_step_list = [50, 1, 50]
                     )

legend = mlegend(legend_display_type = "continuous",
                 legend_entry_border='off',
                 legend_text_colour = "charcoal",
                 legend_values_list= [-15., -10, -5, 0, 5, 10, 15],
                 legend_text_composition = 'user_text_only',
                 legend_user_maximum = "on",
)

Image Added



Column
width30%


Panel
titleQuick links :

Import data:

Gallery:

 

 

Image Removed




 

 

 

HTML
<div id="magics">	
</div>

<script src="/wiki/download/attachments/13207038/magdoc.js"></script>
<link rel="stylesheet" type="text/css" href="/wiki/download/attachments/13207038/magics.css" />
<link rel="stylesheet" type="text/css" href="/wiki/download/attachments/13207038/jquery.miniColors.css" />
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="/wiki/download/attachments/13207038/jquery.miniColors.js"></script>

 <script>
	load("/wiki/download/attachments/14158128/cont.json");
</script>

...