In this preamble, we load the gstlearn library.
This is the (non-exhaustive) list of classes (of objects) in gstlearn:
You should download the ASCII file called Scotland_Temperatures.csv (organized as a CSV file) and store it on your disk in the current working directory. In this example, the file (called filecsv) is provided as a CSV format file. We load it into a data frame (names datcsv) using the relevant R-command.
dlfile = "https://soft.minesparis.psl.eu/gstlearn/data/Scotland/Scotland_Temperatures.csv"
filecsv = "Scotland_Temperatures.csv"
download.file(dlfile, filecsv)
datcsv = read.csv(filecsv)
We can check the contents of the data frame (by simply typing its name) and see that it contains four columns (respectively called Longitude, Latitude, Elevation, January_temp) and 236 rows (header line excluded).
Note that the last column contains several values called MISS: this corresponds to the absence of information.
We now want to load this information in order to obtain a data base of the gstlearn package (or Db) that will be called dat. This operation can be performed directly by reading the CSV file again and load it directly into a Db.
Note that we introduce a CSVformat description where we can specifiy the specificities of the file to be read, in particular we can tell how to spell the conventional value used for coding missing information.
csv = CSVformat_create(flagHeader=TRUE, naString = "MISS")
dat = Db_createFromCSV(filecsv, csv=csv)
dat
##
## Data Base Characteristics
## =========================
##
## Data Base Summary
## -----------------
## File is organized as a set of isolated points
## Space dimension = 0
## Number of Columns = 5
## Maximum Number of UIDs = 5
## Total number of samples = 236
##
## Variables
## ---------
## Column = 0 - Name = rank - Locator = NA
## Column = 1 - Name = Longitude - Locator = NA
## Column = 2 - Name = Latitude - Locator = NA
## Column = 3 - Name = Elevation - Locator = NA
## Column = 4 - Name = January_temp - Locator = NA
A last solution is to import it directly from the set of demonstration files (provided together with the package and called fileNF) and stored in a specific format (Neutral file).
These NF (or neutral file) are currently used for serialization of the gstlearn objects. They will probably be replaced in the future by a facility backuping the whole workspace in one step.
Note that the contents of the Db is slightly different from the result obtained when reading from CSV. Essentially, some variables have a Locator field defined, some do not. This concept will be described later in this chapter and the difference can be ignored.
dlfile = "https://soft.minesparis.psl.eu/gstlearn/data/Scotland/Scotland_Temperatures.NF"
fileNF = "Scotland_Temperatures.NF"
download.file(dlfile, fileNF)
dat = Db_createFromNF(fileNF)
dat
##
## Data Base Characteristics
## =========================
##
## Data Base Summary
## -----------------
## File is organized as a set of isolated points
## Space dimension = 2
## Number of Columns = 5
## Maximum Number of UIDs = 5
## Total number of samples = 236
##
## Variables
## ---------
## Column = 0 - Name = rank - Locator = NA
## Column = 1 - Name = Longitude - Locator = x1
## Column = 2 - Name = Latitude - Locator = x2
## Column = 3 - Name = Elevation - Locator = NA
## Column = 4 - Name = January_temp - Locator = z1
Typing the name of the object automatically launches the display action. It is equivalent to simply typing the name of the object (at the end of a chunk in a RMarkdown file).
dat$display()
##
## Data Base Characteristics
## =========================
##
## Data Base Summary
## -----------------
## File is organized as a set of isolated points
## Space dimension = 2
## Number of Columns = 5
## Maximum Number of UIDs = 5
## Total number of samples = 236
##
## Variables
## ---------
## Column = 0 - Name = rank - Locator = NA
## Column = 1 - Name = Longitude - Locator = x1
## Column = 2 - Name = Latitude - Locator = x2
## Column = 3 - Name = Elevation - Locator = NA
## Column = 4 - Name = January_temp - Locator = z1
## NULL
There, we can check that the 4 initial fields have been considered, in addition to a firs one, automatically called rank, for a total of 5 columns (the information regarding UID will not be addressed in this chapter).
We can check that each field is assigned to a numbered Column. Finally the total number of samples is 236 as expected.
In addition, some interesting information tells you that this data base corresponds to a 2-D dimension one: this will be described later together with the use of the Locator information.
To get more information on the contents of the Db, it is possible to use the DbStringFormat option and to use use through the display method. There are several ways to specify the type of information that is searched for (see the documentation of this class for details): typically here we ask for statistics but restrict them to a list of variables
dbfmt = DbStringFormat_createFromFlags(flag_stats=TRUE, names=c("Elevation", "January_temp"))
dat$display(dbfmt)
##
## Data Base Characteristics
## =========================
##
## Data Base Summary
## -----------------
## File is organized as a set of isolated points
## Space dimension = 2
## Number of Columns = 5
## Maximum Number of UIDs = 5
## Total number of samples = 236
##
## Data Base Statistics
## --------------------
## 4 - Name Elevation - Locator NA
## Nb of data = 236
## Nb of active values = 236
## Minimum value = 2.000
## Maximum value = 800.000
## Mean value = 146.441
## Standard Deviation = 165.138
## Variance = 27270.713
## 5 - Name January_temp - Locator z1
## Nb of data = 236
## Nb of active values = 151
## Minimum value = 0.600
## Maximum value = 5.200
## Mean value = 2.815
## Standard Deviation = 1.010
## Variance = 1.020
##
## Variables
## ---------
## Column = 0 - Name = rank - Locator = NA
## Column = 1 - Name = Longitude - Locator = x1
## Column = 2 - Name = Latitude - Locator = x2
## Column = 3 - Name = Elevation - Locator = NA
## Column = 4 - Name = January_temp - Locator = z1
## NULL
We can also consider the data base as a data frame and use the [ ] assessors. The following usage show the whole contents of the data base.
dat[]
## rank Longitude Latitude Elevation January_temp
## 0 1 372.1 658.9 255 1.7
## 1 2 303.5 665.9 125 2.0
## 2 3 218.4 597.9 8 4.6
## 3 4 245.0 955.0 90 NA
## 4 5 326.8 691.2 32 3.1
## 5 6 247.8 664.2 32 3.5
## 6 7 299.0 967.4 21 3.4
## 7 8 319.9 675.7 61 3.0
## 8 9 171.6 620.8 12 4.9
## 9 10 342.2 731.3 45 2.9
## 10 11 365.0 865.0 37 NA
## 11 12 323.5 602.6 242 1.3
## 12 13 275.0 835.0 295 NA
## 13 14 146.4 933.2 15 4.0
## 14 15 352.1 648.8 183 1.7
## 15 16 215.0 745.0 620 NA
## 16 17 232.9 855.1 107 1.9
## 17 18 364.9 741.1 29 3.3
## 18 19 255.4 578.0 178 2.3
## 19 20 335.0 655.0 313 NA
## 20 21 374.3 648.4 152 2.3
## 21 22 212.7 569.3 166 2.6
## 22 23 305.0 625.0 620 NA
## 23 24 203.8 849.2 67 2.7
## 24 25 315.9 673.9 35 2.9
## 25 26 215.0 835.0 665 NA
## 26 27 272.5 688.2 335 1.0
## 27 28 318.8 830.3 215 1.2
## 28 29 215.0 565.0 145 NA
## 29 30 248.0 666.7 5 3.1
## 30 31 245.0 745.0 630 NA
## 31 32 236.9 626.1 16 3.7
## 32 33 279.9 589.0 146 2.1
## 33 34 270.2 739.4 130 2.5
## 34 35 351.3 673.6 49 2.9
## 35 36 395.0 805.0 30 NA
## 36 37 245.0 685.0 60 NA
## 37 38 275.0 625.0 442 NA
## 38 39 460.7 1208.9 24 3.1
## 39 40 323.2 659.5 185 2.1
## 40 41 245.0 775.0 780 NA
## 41 42 283.0 960.9 38 2.7
## 42 43 251.1 660.1 30 3.0
## 43 44 185.0 805.0 210 NA
## 44 45 305.0 805.0 760 NA
## 45 46 291.8 711.2 152 1.8
## 46 47 335.0 625.0 370 NA
## 47 48 275.0 775.0 433 NA
## 48 49 263.4 708.0 107 2.2
## 49 50 321.3 869.9 125 2.9
## 50 51 240.6 565.7 46 3.3
## 51 52 275.0 685.0 229 NA
## 52 53 99.9 744.6 9 5.0
## 53 54 315.0 652.0 244 1.6
## 54 55 245.0 565.0 46 NA
## 55 56 317.5 743.8 70 2.1
## 56 57 372.4 754.4 30 3.2
## 57 58 225.9 974.7 112 4.2
## 58 59 299.7 622.6 295 1.1
## 59 60 245.0 625.0 95 NA
## 60 61 271.4 664.3 66 2.7
## 61 62 315.2 791.4 339 0.6
## 62 63 336.4 952.2 36 3.2
## 63 64 335.0 835.0 310 NA
## 64 65 310.1 723.9 23 2.5
## 65 66 347.9 636.7 198 2.0
## 66 67 230.3 683.6 89 2.8
## 67 68 305.0 685.0 45 NA
## 68 69 335.0 859.5 32 3.2
## 69 70 350.3 716.7 18 3.2
## 70 71 78.2 855.5 5 4.5
## 71 72 324.5 675.5 26 3.3
## 72 73 208.3 664.9 43 4.1
## 73 74 324.4 663.6 184 2.2
## 74 75 312.5 703.3 116 1.7
## 75 76 180.0 827.6 4 4.3
## 76 77 142.5 679.1 20 5.2
## 77 78 365.0 835.0 305 NA
## 78 79 344.8 780.0 258 1.6
## 79 80 155.3 745.3 37 3.9
## 80 81 322.9 863.0 15 3.1
## 81 82 185.0 685.0 15 NA
## 82 83 141.8 850.1 67 3.5
## 83 84 217.5 654.4 5 4.7
## 84 85 274.9 855.7 5 3.6
## 85 86 275.0 955.0 198 NA
## 86 87 376.6 839.2 55 1.8
## 87 88 338.8 748.6 61 1.7
## 88 89 245.0 715.0 488 NA
## 89 90 215.0 685.0 152 NA
## 90 91 275.0 865.0 70 NA
## 91 92 455.0 1165.0 2 NA
## 92 93 245.0 895.0 430 NA
## 93 94 245.0 535.0 48 NA
## 94 95 185.0 865.0 325 NA
## 95 96 358.7 609.7 155 1.7
## 96 97 245.0 925.0 210 NA
## 97 98 318.5 673.5 61 3.0
## 98 99 138.3 695.9 35 4.6
## 99 100 207.4 913.4 14 3.9
## 100 101 250.6 666.3 8 3.2
## 101 102 297.4 646.4 208 1.3
## 102 103 275.0 925.0 250 NA
## 103 104 155.0 745.0 30 NA
## 104 105 245.0 865.0 520 NA
## 105 106 173.9 891.8 16 4.7
## 106 107 335.0 805.0 540 NA
## 107 108 373.6 634.6 34 2.6
## 108 109 291.8 759.9 94 2.0
## 109 110 203.5 620.9 18 4.7
## 110 111 259.3 756.2 232 1.2
## 111 112 346.8 720.9 10 2.9
## 112 113 298.6 809.5 341 0.9
## 113 114 387.5 786.4 4 3.0
## 114 115 305.0 955.0 100 NA
## 115 116 181.3 664.3 12 3.6
## 116 117 303.4 828.3 220 0.7
## 117 118 245.2 564.6 15 3.3
## 118 119 365.0 805.0 312 NA
## 119 120 215.0 715.0 335 NA
## 120 121 305.0 775.0 800 NA
## 121 122 275.1 560.7 73 2.7
## 122 123 215.0 895.0 160 NA
## 123 124 391.5 804.2 52 2.7
## 124 125 387.7 812.7 65 2.4
## 125 126 125.0 925.0 50 NA
## 126 127 335.0 715.0 40 NA
## 127 128 284.1 717.7 113 2.0
## 128 129 309.0 718.5 41 2.6
## 129 130 305.0 835.0 305 NA
## 130 131 186.1 881.8 6 4.3
## 131 132 185.0 775.0 130 NA
## 132 133 275.0 595.0 265 NA
## 133 134 215.0 865.0 280 NA
## 134 135 215.0 655.0 15 NA
## 135 136 290.2 682.0 3 3.1
## 136 137 409.3 858.2 26 3.4
## 137 138 355.5 735.2 27 3.1
## 138 139 377.9 820.4 54 2.0
## 139 140 287.9 623.9 274 1.3
## 140 141 352.3 832.3 146 1.9
## 141 142 335.0 595.0 375 NA
## 142 143 257.2 662.7 23 3.3
## 143 144 238.1 809.1 21 2.7
## 144 145 140.2 799.6 5 4.4
## 145 146 215.0 775.0 280 NA
## 146 147 445.4 1139.8 82 3.0
## 147 148 285.6 803.8 250 0.9
## 148 149 326.0 794.6 283 0.7
## 149 150 395.0 865.0 45 NA
## 150 151 232.1 709.8 12 3.6
## 151 152 185.0 715.0 130 NA
## 152 153 294.7 887.5 18 3.5
## 153 154 335.0 865.0 2 NA
## 154 155 369.2 795.9 94 2.4
## 155 156 291.3 808.2 305 1.0
## 156 157 275.0 655.0 26 NA
## 157 158 237.9 623.3 48 3.6
## 158 159 215.0 805.0 230 NA
## 159 160 245.0 805.0 760 NA
## 160 161 275.0 715.0 457 NA
## 161 162 275.0 565.0 64 NA
## 162 163 306.7 862.7 5 3.0
## 163 164 245.0 655.0 200 NA
## 164 165 348.3 1007.6 26 3.5
## 165 166 437.2 1135.7 21 4.0
## 166 167 311.7 684.8 40 3.0
## 167 168 208.0 776.4 8 3.6
## 168 169 395.0 835.0 122 NA
## 169 170 279.3 693.6 46 3.2
## 170 171 369.6 791.7 120 1.7
## 171 172 338.8 715.2 25 2.7
## 172 173 384.5 620.2 221 1.9
## 173 174 305.0 595.0 244 NA
## 174 175 305.0 565.0 2 NA
## 175 176 218.3 651.4 8 4.4
## 176 177 312.3 629.6 226 1.9
## 177 178 214.1 685.7 12 3.3
## 178 179 335.0 745.0 175 NA
## 179 180 275.0 805.0 490 NA
## 180 181 368.9 864.7 24 3.5
## 181 182 314.1 646.3 253 1.7
## 182 183 211.3 697.8 24 3.0
## 183 184 305.0 925.0 245 NA
## 184 185 353.9 730.9 5 2.7
## 185 186 305.0 745.0 95 NA
## 186 187 288.8 615.3 387 1.0
## 187 188 266.8 846.2 4 3.3
## 188 189 275.0 745.0 183 NA
## 189 190 335.0 775.0 760 NA
## 190 191 325.8 670.6 134 3.2
## 191 192 399.9 867.5 18 3.9
## 192 193 95.0 745.0 15 NA
## 193 194 305.0 655.0 360 NA
## 194 195 298.2 574.7 49 3.0
## 195 196 365.0 745.0 65 NA
## 196 197 367.2 679.1 23 3.8
## 197 198 215.0 925.0 80 NA
## 198 199 370.7 761.7 55 2.8
## 199 200 245.0 835.0 395 NA
## 200 201 304.7 858.7 50 2.9
## 201 202 323.6 602.7 242 1.4
## 202 203 278.6 692.5 38 2.6
## 203 204 445.3 1139.7 82 3.0
## 204 205 125.0 865.0 162 NA
## 205 206 236.1 578.9 110 2.8
## 206 207 286.9 856.8 8 2.9
## 207 208 202.8 763.0 15 3.6
## 208 209 245.0 595.0 300 NA
## 209 210 342.8 627.8 168 2.0
## 210 211 166.3 622.6 10 4.6
## 211 212 391.4 669.3 75 3.7
## 212 213 155.0 955.0 100 NA
## 213 214 275.0 895.0 185 NA
## 214 215 201.3 637.7 15 4.5
## 215 216 387.1 810.7 102 2.7
## 216 217 365.0 775.0 95 NA
## 217 218 215.7 530.4 78 4.7
## 218 219 344.6 802.5 177 1.7
## 219 220 277.2 676.0 94 1.9
## 220 221 227.4 675.7 61 3.5
## 221 222 365.0 655.0 342 NA
## 222 223 365.0 625.0 91 NA
## 223 224 185.0 895.0 65 NA
## 224 225 328.3 639.7 165 2.1
## 225 226 263.8 653.5 178 2.3
## 226 227 202.5 862.9 25 3.1
## 227 228 155.0 685.0 330 NA
## 228 229 305.0 715.0 91 NA
## 229 230 366.9 778.2 171 2.0
## 230 231 260.6 580.5 55 2.6
## 231 232 273.2 564.6 47 2.8
## 232 233 333.9 730.1 30 2.6
## 233 234 185.0 655.0 115 NA
## 234 235 259.8 587.9 119 2.1
## 235 236 260.8 668.6 107 2.6
We can access to one or several variables. Note that the contents of the Column corresponding to the target variable (i.e. January_temp) is produced as a series of values (printed along a line).
Also note the presence of samples with NA corresponding to those where the target variable is not informed.
dat["January_temp"]
## [1] 1.7 2.0 4.6 NA 3.1 3.5 3.4 3.0 4.9 2.9 NA 1.3 NA 4.0 1.7 NA 1.9 3.3
## [19] 2.3 NA 2.3 2.6 NA 2.7 2.9 NA 1.0 1.2 NA 3.1 NA 3.7 2.1 2.5 2.9 NA
## [37] NA NA 3.1 2.1 NA 2.7 3.0 NA NA 1.8 NA NA 2.2 2.9 3.3 NA 5.0 1.6
## [55] NA 2.1 3.2 4.2 1.1 NA 2.7 0.6 3.2 NA 2.5 2.0 2.8 NA 3.2 3.2 4.5 3.3
## [73] 4.1 2.2 1.7 4.3 5.2 NA 1.6 3.9 3.1 NA 3.5 4.7 3.6 NA 1.8 1.7 NA NA
## [91] NA NA NA NA NA 1.7 NA 3.0 4.6 3.9 3.2 1.3 NA NA NA 4.7 NA 2.6
## [109] 2.0 4.7 1.2 2.9 0.9 3.0 NA 3.6 0.7 3.3 NA NA NA 2.7 NA 2.7 2.4 NA
## [127] NA 2.0 2.6 NA 4.3 NA NA NA NA 3.1 3.4 3.1 2.0 1.3 1.9 NA 3.3 2.7
## [145] 4.4 NA 3.0 0.9 0.7 NA 3.6 NA 3.5 NA 2.4 1.0 NA 3.6 NA NA NA NA
## [163] 3.0 NA 3.5 4.0 3.0 3.6 NA 3.2 1.7 2.7 1.9 NA NA 4.4 1.9 3.3 NA NA
## [181] 3.5 1.7 3.0 NA 2.7 NA 1.0 3.3 NA NA 3.2 3.9 NA NA 3.0 NA 3.8 NA
## [199] 2.8 NA 2.9 1.4 2.6 3.0 NA 2.8 2.9 3.6 NA 2.0 4.6 3.7 NA NA 4.5 2.7
## [217] NA 4.7 1.7 1.9 3.5 NA NA NA 2.1 2.3 3.1 NA NA 2.0 2.6 2.8 2.6 NA
## [235] 2.1 2.6
But it can be more restrictive as in the following paragraph, where we only consider the samples 10 to 15, and only consider the variables Latitude and Elevation.
dat[10:15, c("Latitude", "Elevation")]
## Latitude Elevation
## 9 731.3 45
## 10 865.0 37
## 11 602.6 242
## 12 835.0 295
## 13 933.2 15
## 14 648.8 183
We can also replace the variable Name by their Column rank. Although this is not recommanded as the Column number may vary over time.
dat[10:15, 3:4]
## Latitude Elevation
## 9 731.3 45
## 10 865.0 37
## 11 602.6 242
## 12 835.0 295
## 13 933.2 15
## 14 648.8 183
Please also note the feature that a variable whose name does not exist (newvar) in the data base, is created on the fly. Also note that variables may be specified with names referred to using traditional regexp expressions (i.e. the symbol '*' replaces any list of characters):
dat["newvar"] = 12.3 * dat["Elevation"] - 2.1 * dat["*temp"]
dat
##
## Data Base Characteristics
## =========================
##
## Data Base Summary
## -----------------
## File is organized as a set of isolated points
## Space dimension = 2
## Number of Columns = 6
## Maximum Number of UIDs = 6
## Total number of samples = 236
##
## Variables
## ---------
## Column = 0 - Name = rank - Locator = NA
## Column = 1 - Name = Longitude - Locator = x1
## Column = 2 - Name = Latitude - Locator = x2
## Column = 3 - Name = Elevation - Locator = NA
## Column = 4 - Name = January_temp - Locator = z1
## Column = 5 - Name = newvar - Locator = NA
The locators are used to specify the role assigned to a Column for the rest of the study (unless changed further). The locator is characterized by its name (Z for a variable and X for a coordinate) within the Enumeration ELoc and its rank.
dat$setLocators(c("Longitude","Latitude"), ELoc_X())
## NULL
dat$setLocator("*temp", ELoc_Z(), cleanSameLocator=TRUE)
## NULL
dat
##
## Data Base Characteristics
## =========================
##
## Data Base Summary
## -----------------
## File is organized as a set of isolated points
## Space dimension = 2
## Number of Columns = 6
## Maximum Number of UIDs = 6
## Total number of samples = 236
##
## Variables
## ---------
## Column = 0 - Name = rank - Locator = NA
## Column = 1 - Name = Longitude - Locator = x1
## Column = 2 - Name = Latitude - Locator = x2
## Column = 3 - Name = Elevation - Locator = NA
## Column = 4 - Name = January_temp - Locator = z1
## Column = 5 - Name = newvar - Locator = NA
As can be seen in the printout, variables Latitude and Longitude have been designated as coordinates (pay attention to the order) and January_temp is the (unique) variable. Therefore any subsequent step will be performed as a monovariate 2-D process.
The locator is translated into a letter,number pair for better legibility: e.g. x1 for the first coordinate.
Plot the contents of a Db using functions of the plot.R package. The proportional option is used to represent to january_temp variable
p = ggDefaultGeographic()
p = p + plot.point(dat, name_size="January_temp", show.legend.symbol = TRUE,
legend.name.size="Temperature")
p = p + plot.decoration(title="My Data Base", xlab="Easting", ylab="Northing")
ggPrint(p)
A more elaborated graphic representation displays the samples with a symbol proportional to the Elevation and a color representing the Temperature.
p = ggDefaultGeographic()
p = p + plot.point(dat, name_size="Elevation", name_color="January_temp")
p = p + plot.decoration(title="My Data Base", xlab="Easting", ylab="Northing")
ggPrint(p)
On the same area, a terrain model is available (as a demonstration file available in the package distribution). We first download it as an element of a data base defined on a grid support (DbGrid).
dlfile = "https://soft.minesparis.psl.eu/gstlearn/data/Scotland/Scotland_Elevations.NF"
fileNF = "Scotland_Elevations.NF"
download.file(dlfile, fileNF)
grid = DbGrid_createFromNF(fileNF)
grid
##
## Data Base Grid Characteristics
## ==============================
##
## Data Base Summary
## -----------------
## File is organized as a regular grid
## Space dimension = 2
## Number of Columns = 4
## Maximum Number of UIDs = 4
## Total number of samples = 11097
## Number of active samples = 3092
##
## Grid characteristics:
## ---------------------
## Origin : 65.000 535.000
## Mesh : 4.938 4.963
## Number : 81 137
##
## Variables
## ---------
## Column = 0 - Name = Longitude - Locator = x1
## Column = 1 - Name = Latitude - Locator = x2
## Column = 2 - Name = Elevation - Locator = f1
## Column = 3 - Name = inshore - Locator = sel
We can check that the grid is constituted of 81 columns and 137 rows, or 11097 grid cells.
We can check the presence of a variable (called inshore) which is assigned to the sel locator: this corresponds to a Selection which acts as a binary filter: some grid cells are active and others are masked off. The count of active samples is given in the previous printout (3092). This selection remains active until it is replaced or deleted (there may not be more than one selection defined at a time per data base). This is what can be seen in the following display where we represent the Elevation only within the inshore selection.
Note that any variable can be considered as a Selection: it must simply be assigned to the sel locator using the setLocator variable described earlier.
p = ggDefaultGeographic()
p = p + plot.grid(grid, name_raster="Elevation")
p = p + plot.decoration(title="My Grid", xlab="Easting", ylab="Northing")
ggPrint(p)
On this final plot, we combine grid and point representations.
p = ggDefaultGeographic()
p = p + plot.grid(grid, name_raster="Elevation")
p = p + plot.point(dat, name_size="Elevation", sizmin=1, sizmax=3, color="yellow")
p = p + plot.decoration(title="My Grid", xlab="Easting", ylab="Northing")
ggPrint(p)