To plot data on a map of Scotland in Matlab, you can use the geobubble or geoscatter functions from the Mapping toolbox. Here is an example code that demonstrates the plotting of data on a map of Scotland:
main.m394 chars14 lines
Note that the shaperead function reads a shapefile to obtain the map data for Scotland. The UseGeoCoords option is set to true to ensure that the data is properly geo-referenced.
The geoscatter function is used to create a scatter plot of the data on the map. The Marker and MarkerSize options are used to customize the appearance of the data points. You can adjust these options to suit your needs.
Finally, the title function is used to add a title to the plot. You can modify this function to add other elements to the plot, such as a legend, a colorbar or annotations.
gistlibby LogSnag