0
votes

I am running a weather prediction model (WRF) to predict various weather phenomena used to predict if the weather will be suitable for cross-country gliding.

In order to visualize trends in the prediction for a specific day, I am attempting to make pm3d map plots like the upper-right plot in this image example plot.

The weather model, and thus my scripts producing CSV data, run every 24 hours and produce data for the next 7 days. This results in a CSV file with this structure (only timestamps in seconds instead of hours):

# Timestamp_now, Timestamp_prediction, Value
0, 0, $value
0, 1, $value
...
0, 24, $value
0, 25, $value
...
0, 48, $value

And the next day this data is added:

24, 24, $value
24, 25, $value
...
24, 48, $value
...
24, 72, $value

The problem which arises, as can be seen in upper-right plot in the linked image, is that gnuplot connects the first datapoint of yesterday's prediction with the first datapoint of today's prediction. This is undesired behavior. I would like to see gnuplot connect data-points with the same y-value (predicted date).

Are there any options inside of gnuplot which I can use to trigger this behavior?

1
I think gnuplot can produce the plot you want to make, but I don't see clearly what your problem is. Could you post a short set of data and the corresponding plot, highlighting the problem? - Joce
you may have to sort your data by y value, and add an empty line between two data points every time you want to disconnect them. - Sébastien Guarnay

1 Answers

0
votes

There are different options how gnuplot draws the map, have a look at these exmples (~ at the middle of the page): http://gnuplot.sourceforge.net/demo/pm3d.html

For more sophisticated heat map plotting, I would suggest to use python & matplotlib, there are much more options for interpolating/re-gridding the data. (personally, I also started with gnuplot and then switched to python because its much more capable for numerics/data processing).