From 8b919daaa31d711f016075bd6575ec26d05b9fb1 Mon Sep 17 00:00:00 2001
From: eliocamp There are several parameters that control the feel of the result.
Visualization tools
Elio
Campitelli
- 2024-09-24
+ 2024-10-14
Source: vignettes/Visualization-tools.Rmd
Visualization-tools.Rmd
geom_streamline(g <- ggplot(temperature[lev == 500], aes(lon, lat)) +
geom_contour_fill(aes(z = air.z)) +
geom_streamline(aes(dx = t.dy, dy = -t.dx), L = 10, res = 2,
- arrow.length = 0.3, xwrap = c(0, 360)))
+ arrow.length = 0.3, xwrap = c(0, 360)))
+#> Warning: Computation failed in `stat_streamline()`.
+#> Caused by error in `[.data.table`:
+#> ! Supplied 5 items to be assigned to group 1 of size 4 in column 'step'. The RHS length must either be 1 (single values are ok) or match the LHS length exactly. If you wish to 'recycle' the RHS please use rep() explicitly to make this intent clear to readers of your code.
L
and res
control the length and resolution,
@@ -529,7 +532,10 @@ geom_streamlinedlat() are an easy way of doing this. This tight coupling
also means that they are robust to coordinate transformations.
-g + coord_polar()
g + coord_polar()
+#> Warning: Computation failed in `stat_streamline()`.
+#> Caused by error in `[.data.table`:
+#> ! Supplied 5 items to be assigned to group 1 of size 4 in column 'step'. The RHS length must either be 1 (single values are ok) or match the LHS length exactly. If you wish to 'recycle' the RHS please use rep() explicitly to make this intent clear to readers of your code.
stat_streamline()
computes three useful variables.
step
is the integration step, and dx
and
@@ -549,7 +555,10 @@
F6po%Z%Z>p5C4FHQEt>PV
zow^Hp4or>9J2-^ZIjAsQ!f;z+ne>vjnC^7 3$+M(*}2L)=c8tr5_8j$qGqv)}~C7
zUvd(zwEv_q1FTEWLkcIV=`;l|v8b@L0=O_hu e;?klesX>%`yzJJk)-CU(*QPIFiyyQwZ&dcC<9YgvSF2CE}Cns#QGj!~A*=LD<
znwN@o`akeeQ~1p@bpP~7+~Qqk Gqofvwr;vus>YPeV1|?(dSbf5H->k+
zpgSr4V3a&2TKasJUP;4%YBof7 P%SSx&Rd!P;Yg
zRaGlXT8l |#*K8gz6Q
zF!$^G1LnU#VrQtM>)Rb*q*LN!b?8+0mBe+{qKd&dQuiC1
zAb5H2xjJ&qne>Ly(QJU
a3SlP*g7;b6tj{12v$PTn?2X4
z$&&3j$Y>{3S`+~@CzKiWT;LKxf*E>cK@&bwXW(}l|DTS38l-%G{Wy9TnH^|WLPbV4J~5Br`Wotl
zL;(CrxZTV?7*LuaG(NXYP!
xKk{z{FtvoMQW*SWt1r|
z=Y7;#ijgpol#&YOM?8GV)KvzI(;GcW`+e&4)Js8&A9s9UUI4SR!qIo9DMH-