similar to: about plotting a special case

Displaying 20 results from an estimated 5000 matches similar to: "about plotting a special case"

2017 Jul 13
2
about plotting a special case
Thanks, Jim. The code works, but I don't understand why you use q1090 <- quantile(DF1$B, probs=c()), rather than DF1$A? Also, how to add a legend for both points DF1 and DF2? On Wed, Jul 12, 2017 at 8:25 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi lily, > Here is the first plot: > > plot(DF1$A,DF1$B,pch=19,col="red") > meanA<-mean(DF1$A) >
2017 Jul 13
0
about plotting a special case
Hi lily, Here is the first plot: plot(DF1$A,DF1$B,pch=19,col="red") meanA<-mean(DF1$A) meanB<-mean(DF1$B) points(meanA,meanB,pch=18,col="red") q1090<-quantile(DF1$B,probs=c(0.1,0.9)) library(plotrix) dispersion(meanA,meanB,q1090[2],q1090[1], intervals=FALSE,col="red") The same code will work for a second data frame, except that you would use
2017 Jul 13
0
about plotting a special case
If you want colors mapped to the _values_ in DF1$C, there are a number of ways to do it: Color_unq<-color.scale(DF1$C,c(1,0),c(0,0,c(0,1)) This will produce colors from the lowest values (red) through the highest (blue). See the help page for color.scale to get different colors. With this you can use color.legend to add a mapping of the values and colors. If you just want different colors,
2017 Oct 10
1
About multiple panels with limited space in-between
Hi R users, I have a question about plotting. The following two datasets are an example. What I have in mind is like the attached figure, but just have two rows, top row is for DF1, bottom row is for DF2. The top and bottom rows, have x-axis as var1, var2, var3, etc, while the y-axis represents A. For each row, only the leftmost panel has y-axis ticks and label. For the two rows, only the bottom
2012 Feb 16
1
how to get r-squared for a predefined curve or function with "other" data points
hello mailing list! i still consider myself an R beginner, so please bear with me if my questions seems strange. i'm in the field of biology, and have done consecutive hydraulic conductivity measurements in three parallels ("Sample"), resulting in three sets of conductivity values ("PLC" for percent loss of conductivity, relative to 100%) at multiple pressures
2017 Aug 06
2
about saving format
In the lower right panel of R-studio interface, there is the "Export" button. I saved as PDF from there directly, rather than using functions On Sat, Aug 5, 2017 at 6:18 PM, Ismail SEZEN <sezenismail at gmail.com> wrote: > > > On 6 Aug 2017, at 03:01, lily li <chocold12 at gmail.com> wrote: > > > > I am using the plot() function, but have a problem.
2018 Mar 08
3
add single points to a level plot
Hi all, I'm trying to add single points with known coordinates to a level plot, but could not find the proper answer. I got to know that layer() function is good for this, but I don't know which package is related to this function. The source is here: https://stackoverflow.com/questions/28597149/add-xy-points-to-raster-map-generated-by-levelplot but my question is a little different as I
2018 Jan 16
2
Steps to create spatial plots
Hi Bert, I think you are correct that I can use levelplot, but I have a question about converting data. For example, the statement: levelplot(Z~X*Y), Z is row-wise from the lower left corner to the upper right corner. My dataset just have gridded Z data as a txt file (or can be called matrix?), how to convert them to the vector in order for levelplot to use? Thanks. On Mon, Jan 15, 2018 at 6:04
2017 Jul 16
2
About doing figures
Hi Jim, For true color, I meant that the points in the figure do not correspond to the values from the dataframe. Also, why to use rainbow(9) here? And the legend is straight in the middle, is it possible to reformat it to the very bottom? Thanks again. On Sun, Jul 16, 2017 at 2:50 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi lily, > As I have no idea of what the "true
2017 Aug 06
2
about saving format
If the OP is using RStudio and not using R (i.e. pdf()) directly, it sounds like this query should be directed to RStudio support, not here. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Aug 5, 2017 at 5:54 PM, Ismail
2018 Mar 08
0
add single points to a level plot
Hi all, I ran the code: > s <- stack(replicate(2, raster(matrix(runif(100), 10)))) > xy <- data.frame(coordinates(sampleRandom(s, 10, sp=TRUE)), + z1=runif(10), z2=runif(10)) > levelplot(s, margin=FALSE, at=seq(0, 1, 0.05)) + + layer(sp.points(xy, pch=ifelse(pts$z1 < 0.5, 2, 3), cex=2, col=1), columns=1) + + layer(sp.points(xy, pch=ifelse(pts$z2 < 0.5, 2,
2017 Jul 16
0
About doing figures
For more than 10 records, how to reformat the colors? Also, how to show the first legend only, but at the bottom, while the second legend in your code is not necessary? In all, the same A values have the same color, but different symbols in DF==1 and DF==2. Thanks for your help. On Sun, Jul 16, 2017 at 9:28 AM, lily li <chocold12 at gmail.com> wrote: > Hi Jim, > > For true color,
2018 Jan 16
0
Steps to create spatial plots
Sorry for the emails, I just wanted to have an example. layer$z 1 1 3 4 6 2 2 3 4 1 2 9 1 4 5 2 1 8 How to convert the matrix to layer$z = c(1, 4, 5, 2, 1, 8, 2, 3, 4, 1, 2, 9, 1, 1, 3, 4, 6, 2)? I think this vector is the order that levelplot can use. Thanks again. On Mon, Jan 15, 2018 at 10:58 PM, lily li <chocold12 at gmail.com> wrote: > Hi Bert, > > I think
2018 Jan 16
1
Steps to create spatial plots
If layer$z is a matrix and you want to reverse the order of the rows, you can do: n <- nrow(layer$z) layer$z <- layer$z[ n:1, ] HTH, Eric On Tue, Jan 16, 2018 at 8:43 AM, lily li <chocold12 at gmail.com> wrote: > Sorry for the emails, I just wanted to have an example. > layer$z > > 1 1 3 4 6 2 > 2 3 4 1 2 9 > 1 4 5 2 1 8 > > How to convert
2018 Jan 16
3
Steps to create spatial plots
Hi Roman, Thanks for your reply. For the spatial coordinates layer, I just have coordinates of the upper left corner, numbers of rows and columns of the spatial map, and grid cell size. How to create a spatial layer of coordinates from this data? Thanks. On Mon, Jan 15, 2018 at 3:26 PM, Roman Lu?trik <roman.lustrik at gmail.com> wrote: > You will need to coerce your data into a
2018 Feb 16
2
error in loading rgdal package
Hi R users, Could you help me to see this problem? I could now load "rgdal" even though I downloaded the compressed folder. Thanks for your help. Loading required package: sp Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgdal/libs/rgdal.so': [[alternative HTML version deleted]]
2017 Aug 06
0
about saving format
> On 6 Aug 2017, at 03:47, lily li <chocold12 at gmail.com> wrote: > > In the lower right panel of R-studio interface, there is the "Export" button. I saved as PDF from there directly, rather than using functions > > On Sat, Aug 5, 2017 at 6:18 PM, Ismail SEZEN <sezenismail at gmail.com> wrote: > > > On 6 Aug 2017, at 03:01, lily li <chocold12 at
2018 Jan 16
0
Steps to create spatial plots
>From your description, I am **guessing** that you may not want a "spatial map" (including projections) at all, but rather something like a level plot. See ?levelplot in the lattice package for details. Both I am sure ggplot2 has something similar. Apologies if I havemisunderstood your intent/specifications. Cheers, Bert Bert Gunter "The trouble with having an open mind is
2017 Oct 11
2
about taylor.diagram
Hi R users, I don't know if you have used taylor.diagram function. Why my diagram is not like 1/4th of a round shape, but more flat, like 1/4th of an oval? Thanks. [[alternative HTML version deleted]]
2018 Mar 08
1
add single points to a level plot
You need to load the package 'rasterVis' > library(rasterVis) HTH, Eric On Thu, Mar 8, 2018 at 5:11 PM, lily li <chocold12 at gmail.com> wrote: > Hi all, > > I ran the code: > > s <- stack(replicate(2, raster(matrix(runif(100), 10)))) > > xy <- data.frame(coordinates(sampleRandom(s, 10, sp=TRUE)), > + z1=runif(10), z2=runif(10))