Check-list
- Create a Magics python skeleton that displays a global map using the plot command
- Create and use an output object to set-up name and format of your output
- Improve mcoast to tailor the coastlines.
- Add a mtext object to add some texts.
First step
In order to be able to create and use Magics objects, the Magics python package has to be imported.
Any Magics plot will be triggered using the plot command.
A basic plot could be a geographical map, using the default projection, and the default attributes of coastlines.
Magics will instantiate the default driver, a Postscript driver...
Setting the output
The object output allows the definition of the output format, and the settings of the output file name .
Have a look at the PNG output documentation to see which parameters are available to set-up a PNG output.
To create a PNG output, you have to create an output object and to insert at the first position in the plot command
Setting the coastlines
The object mcoast allows the parameterisation of the coastlines.
Have a look at the Coastlines documentation to see which parameters are available.
To configure the look of your coastlines you have to create a mcoast object with the parameters you want.
The mcoast object has to be inserted in the plot command.
Adding a text
Magics allows the user to add of or several lines of text. The position of the text is by default above the plot, but some parameters allow it to be moved around.
Have a look at the Text Plotting Documentation
A basic HTML formatting can be used for colour, style, and font size.
The mtext object has to be inserted in the plot command to see the text on the result.