You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

 

 

Objectives


  • Set-up a cartesian projection for the Cross section
  • Configure the axis
  • Load a Netcdf file, and understand the information needed by Magics.
  • Apply a shading
  • Position the legend box
  • Add a text.

You will need to download


 

 

Setting of the cartesian projection

We want to show our Cross section in the following cartesian system:

  • The vertical coordinate system is a logarithmic axis from 1000 hPa to 200 hPa.
  • The horizontal coordinate system is a geoline axis from [50oN, 90oE] to  [30oN, 60oE]

Have a look at the  subpage documentation to learn how to setup a cartesian projection .

We just have to add 2 axis (1 vertical, 1 horizontal ) to materialise it on the plot.

Parameters to check

 


 

Useful subpage parameters

subpage_map_projection

subpage_x_axis_type
subpage_y_axis_type
subpage_x_min_latitude
subpage_x_min_longitude
subpage_x_max_latitude
subpage_x_max_longitude
subpage_y_min
subpage_y_max
Python - Setting a projection
from Magics.macro import *
#setting the output 
output = output(    
                output_formats = ['png'],
                output_name = "xsect_step1",
                output_name_first_page_number = "off"
        )
# Setting the cartesian view
projection = mmap(
        subpage_map_projection='cartesian',
        subpage_x_axis_type='geoline',
        subpage_y_axis_type='logarithmic',
        subpage_x_min_latitude=50.,
        subpage_x_max_latitude=30.,
        subpage_x_min_longitude=-90.,
        subpage_x_max_longitude=-60.,
        subpage_y_min=1020.,
        subpage_y_max=200.,
        )
# Vertical axis
vertical = maxis(
        axis_orientation='vertical',
        )
# Horizontal axis
horizontal = maxis(
        axis_orientation='horizontal',
        )
        
plot(output, projection, horizontal, vertical)

 

 

 

 

 

 

 

Go to the next step...

Go back to the main page ...

 

  • No labels