To create a new page in Magics Python use the page() function, as shown in this example:
Code Block |
---|
language | py |
---|
title | Multipage output |
---|
linenumbers | true |
---|
|
#importing Magics module
from Magics.macro import *
#Setting of the output file name
output = output(
output_formats = ['ps'],
output_name="multipage"
)
coast_cream = mcoast(
map_coastline_land_shade = 'on',
map_coastline_land_shade_colour = 'cream',
map_coastline_colour = "tan"
)
# create new page
page2 = page()
coast_grey = mcoast(
map_coastline_land_shade_colour = "grey",
map_coastline_land_shade = "on",
map_coastline_colour = "black"
)
#Setting the coordinates of the geographical area
scotland = mmap(subpage_map_projection = 'cylindrical',
subpage_lower_left_latitude= 55.,
subpage_lower_left_longitude= -9.,
subpage_upper_right_latitude= 60.,
subpage_upper_right_longitude=-1.
)
# Plot command putting it all together
plot(output, coast_cream, page2, scotland, coast_grey) |