Versions Compared

Key

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

...

The possible ways to provide data for graph plotting are:

...

Also try dropping a Graph Plotting icon to get connecting lines between the points. Try changing the plot type to a bar chart using the Graph Plotting icon.

Notice that the automatically-generated view fits your data so that the 'edge points' are on the axes.

...

Now create another one called v_axis and make it the vertical axis:

Axis OrientationVertical

Customise this similarly.

...

Now extract the dates and times of the fields and combine them into a list of date variables. There is more than one way to organise this code, but here is one suggestion, very similar to an exercise in Handling Time in Metview.

Code Block
languagepy
dates = nil
loop fc in fs
    d = grib_get_long(fc, 'validityDate')
    t = grib_get_long(fc, 'validityTime')
    dt = date(d) + hour(t/100)
    dates = dates & [dt]
end loop
valid_date(fs)
print(dates)

Now construct an Input Visualiser icon which you will drop into the Macro Editor: ensure that the Input X Type is set to type Date and enter some dummy values so that useful Macro code generated. In the macro, replace the values of input_date_x_values and input_y_values with your lists of data. 

...

Now duplicate the bulk of the code (change some variable names!) in order to additionally plot the time series for the data stored in t2m_analysis.grib, with the points connected by red lines. The plotting part can be done either with an additional plot() command, or else by adding the new Input Visualiser and Graph Plotting code to the end of the existing plot() command.

...