Hi Marna, It's hard to tell exactly what you're looking for, since making "3D" plots of fluid flow has significant interpretative challenges (e.g. how do you see the flow for points that are "inside" the domain?). It is common in fields like oceanography to plot 2D "sections" of the 3D flow -- e.g. a latitude-depth plot at a range of different longitudes. Someone else pointed out the `heatmap()` function, but I would also point out the `imagep()` function in the `oce` package, which can make image plots (with a palette, or colorbar).
Cheers, Clark On Wed, Oct 12, 2016 at 7:00 AM, <r-help-requ...@r-project.org> wrote: > > Message: 18 > Date: Wed, 12 Oct 2016 01:49:28 -0700 > From: Marna Wagley <marna.wag...@gmail.com> > To: r-help mailing list <r-help@r-project.org> > Subject: [R] can we visualize water flows with 3d in R? > Message-ID: > <CAMwU6B30hE4z-bORjGBgcmZNZjc9_4Q8ZUgQNhZ3SFoTc+ss=Q@mail. > gmail.com> > Content-Type: text/plain; charset="UTF-8" > > Hi R Users, > Is it possible to visualize river flow in 3D (latitude, longitude with > respect to depth)? > The example of my data looks like. Any suggestions? > > > dat1 > long lat depth flow > 1 1015.9 857 1.00 1.50 > 2 1015.9 857 1.25 1.23 > 3 1015.9 857 0.50 2.00 > 4 1015.9 858 0.10 1.95 > 5 1015.9 858 0.20 1.50 > 6 1025.0 858 0.30 1.20 > 7 1025.0 858 0.40 0.50 > 8 1025.0 858 0.35 0.70 > 9 1025.0 858 0.24 1.20 > > Thanks for your help. > thanks > > [[alternative HTML version deleted]] > > > > ------------------------------ > > Message: 19 > Date: Wed, 12 Oct 2016 20:49:27 +1100 > From: Jim Lemon <drjimle...@gmail.com> > To: Marna Wagley <marna.wag...@gmail.com> > Cc: r-help mailing list <r-help@r-project.org> > Subject: Re: [R] can we visualize water flows with 3d in R? > Message-ID: > <CA+8X3fVMGZcQZg60T6DizcVdHh-H7_nSX5orpC-W0tGc-osgTQ@mail. > gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Hi Marna, > Isn't the conventional way to visualize depth as shades of blue? > > library(plotrix) > depth.col<-color.scale(dat1$depth,extremes=c("lightblue",blue")) > > Then color the lon/lat rectangles with depth.col > > Jim > > > > On Wed, Oct 12, 2016 at 7:49 PM, Marna Wagley <marna.wag...@gmail.com> > wrote: > > Hi R Users, > > Is it possible to visualize river flow in 3D (latitude, longitude with > > respect to depth)? > > The example of my data looks like. Any suggestions? > > > >> dat1 > > long lat depth flow > > 1 1015.9 857 1.00 1.50 > > 2 1015.9 857 1.25 1.23 > > 3 1015.9 857 0.50 2.00 > > 4 1015.9 858 0.10 1.95 > > 5 1015.9 858 0.20 1.50 > > 6 1025.0 858 0.30 1.20 > > 7 1025.0 858 0.40 0.50 > > 8 1025.0 858 0.35 0.70 > > 9 1025.0 858 0.24 1.20 > > > > Thanks for your help. > > thanks > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/ > posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/ > posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > ------------------------------ > > End of R-help Digest, Vol 164, Issue 12 > *************************************** > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.