plotrix

Adding bias in Taylor diagram in R

可紊 提交于 2019-12-08 02:09:55
问题 I am using the taylor.diagram function in the plotrix package e.g. obs = runif(100,1,100) mod1 = runif(100,1,100) mod2 = runif(100,1,100) mod3 = runif(100,1,100) taylor.diagram(obs,mod1) taylor.diagram(obs,mod2,add=TRUE) taylor.diagram(obs,mod3,add=TRUE) In the conventional Taylor diagram there is no bias but in his paper (Taylor, 2001, K.E. Summarizing multiple aspects of model performance in a single diagram Taylor JGR, 106, 7183-7192) Taylor says that "Although the diagram has been

Plotrix R package polar.plot symbol overwrite

亡梦爱人 提交于 2019-12-07 11:56:58
问题 I'm using a polar plot to describe satellite position during a time series. The following question uses the polar.plot function from the R package plotrix. An example plot: library(plotrix) polar.plot(c(0,1,3,4),c(30,60,90,120),start=90,clockwise=TRUE,rp.type="s", point.symbols=19,radial.lim=c(0,5),boxed.radial=F) The issues I'm running across is that this function plots the labels and axis over the data values (see radial positions 0 and 3), and I don't see a way to control this behavior. I

Adding bias in Taylor diagram in R

不羁岁月 提交于 2019-12-06 13:42:41
I am using the taylor.diagram function in the plotrix package e.g. obs = runif(100,1,100) mod1 = runif(100,1,100) mod2 = runif(100,1,100) mod3 = runif(100,1,100) taylor.diagram(obs,mod1) taylor.diagram(obs,mod2,add=TRUE) taylor.diagram(obs,mod3,add=TRUE) In the conventional Taylor diagram there is no bias but in his paper (Taylor, 2001, K.E. Summarizing multiple aspects of model performance in a single diagram Taylor JGR, 106, 7183-7192) Taylor says that "Although the diagram has been designed to convey information about centered pattern differences it is also possible to indicate differences

plot time series with discontinuous axis in R

天涯浪子 提交于 2019-12-06 10:30:07
I want to plot a time series, excluding in the plot a stretch of time in the middle. If I plot the series alone, with only an index on the x-axis, that is what I get. The interior set of excluded points do not appear. x <- rnorm(50) Dates <- seq(as.Date("2008-1-1"), by = "day", length.out = length(x)) dummy <- c(rep(1, 25), rep(0, 10), rep(1, length(x) - 35)) plot(x[dummy == 1]) Once the dates are on the x-axis, however, R dutifully presents an accurate true time scale, including the excluded dates. This produces a blank region on the plot. plot(Dates[dummy == 1], x[dummy == 1]) How can I get

Remove all axis values and labels in twoord plot

我怕爱的太早我们不能终老 提交于 2019-12-06 10:08:42
I want to remove all the axis including x, left and right y but retain the boundary of the plot. I tried to set xaxt and yaxt to 'n' but no luck. library(plotrix) twoord.plot(2:10,seq(3,7,by=0.5)+rnorm(9), 1:15,rev(60:74)+rnorm(15), type=c("bar","l"), xaxt='n', yaxt='n') Is there any suggestion? Thanks in advance. I don't think so from what I saw. It's easy enough to create this plot anyway: library('plotrix') set.seed(1) x1 <- 2:10 y1 <- seq(3,7,by=0.5)+rnorm(9) x2 <- 1:15 y2 <- rev(60:74)+rnorm(15) par(mfrow = c(1, 3), mar = c(3, 3,2,3)) twoord.plot(x1, y1, x2, y2, type=c("bar","l"), xaxt='n

How to draw a circle in a log-log plot in R?

本秂侑毒 提交于 2019-12-06 04:48:37
问题 I have a plot with two logarithmic axes. I'd like to add a circle to a certain position of the plot. I tried to use plotrix , but this does not give options for "log-radius". # data to plot x = 10^(-1 * c(5:0)) y = x ^-1.5 #install.packages("plotrix", dependencies=T) # use require() within functions library("plotrix") plot (x, y, log="xy", type="o") draw.circle(x=1e-2, y=1e2, radius=1e1, col=2) How can I add a circle to my log-log plot? 回答1: As krlmlr suggests, the easiest solution is to

Creating a histogram with multiple data series using multhist in R

北慕城南 提交于 2019-12-04 10:42:06
I want to create a histogram with multiple data series on the same plot. The best method that I can find to do this is multhist() . I would like a plot in a style similar to hist() , and while ggplot() can also be used to perform this task, the graphics style is not what I want. Here is some example data: df <- structure(list(year = c(2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2011L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L, 2012L,

How to draw a circle in a log-log plot in R?

 ̄綄美尐妖づ 提交于 2019-12-04 09:31:41
I have a plot with two logarithmic axes. I'd like to add a circle to a certain position of the plot. I tried to use plotrix , but this does not give options for "log-radius". # data to plot x = 10^(-1 * c(5:0)) y = x ^-1.5 #install.packages("plotrix", dependencies=T) # use require() within functions library("plotrix") plot (x, y, log="xy", type="o") draw.circle(x=1e-2, y=1e2, radius=1e1, col=2) How can I add a circle to my log-log plot? As krlmlr suggests, the easiest solution is to slightly modify plotrix::draw.circle() . The log-log coordinate system distorts coordinates of a circle given in

How to create a circular plot showing monthly presence or absence using radial.plot / ggplot2

爷,独闯天下 提交于 2019-12-04 07:51:22
I want to create a figure (similar looking to the attached) in ggplot2 that is circular with month of year represented on axis so twelve tick marks around the circumference, with one inner arc of a certain color corresponding to months where pa = 1 (the other options is pa = 0) and another inner arc (outside of the first arc) corresponding to sampled = 1 (other option is sampled = 0). Data looks like this: m season pa month sampled occupancy 1 spring 1 3 1 present 2 spring 1 4 1 present 3 spring 1 5 1 present 4 summer 1 6 1 present 5 summer 1 7 1 present 6 summer 1 8 1 present 7 winter 0 12 1

twoord plot in R

半腔热情 提交于 2019-11-29 17:53:38
Using the plotrix package to make a twoord plot. My attempts look like this The problem I have is that it automatically does not plot the full left axis? Why is this? It is the same in this example here How can I plot with 2 different y-axes? How is it possible to get the full left y? As you didn't provide your data or your code, I offer this as an example: library(plotrix) twoord.plot(2:10, seq(3, 7, by=0.5) + rnorm(9), 1:15, rev(60:74) + rnorm(15), type= c("l", "l"), xaxt = 'n', yaxt = 'n') 来源: https://stackoverflow.com/questions/33971799/twoord-plot-in-r