...
Now drop the Cartesian View icon into the editor of a new Macro icon - the Axis icon definitions will be automatically included. Do the same with the other icons and add a plot()
command, remembering that the view should be the first argument, followed by a data variable, followed by any visdefs to be applied to it.
Now make it more robust to changing data by computing the X Min, etc extents of the view to be 10% less and more than the min and max data values. These are the steps:
- put the lists of x and y values into list variables at the top of the macro and use these variables in the
cartesian_view()
call - to find the minimum value from a list, we need to convert it into a vector variable, then use the
minvalue()
function on the new vector- hint:
min_x = minvalue(vector(x_values))
- hint:
- similarly for the maximum
- we need to do this for min and max of both x and y variables to get what we need to set X Min, X Max, Y Min and Y Max correctly.
Customising Your Plot Title
titles - advanced, GRIB, coloured
could put another case study in here which would bring together some of these advanced topics