similar to: How to access the attributes of a ggplot?

Displaying 20 results from an estimated 900 matches similar to: "How to access the attributes of a ggplot?"

2008 Apr 07
5
How to pack my stuff into a package (library, collection)?
Hello, I am new useR, I have written some functions, which I currently use by "source"-ing them from the files. That's OK, but when I my functions start counting in the tens and hundreds I'd be glad to be able to type "help.search("my_obscure_fun")" and get a sensible reply. I also want to be able to load them as a package at startup and not have to
2008 Mar 22
2
More elegant multiplication or division of a data frame with a vector
Hello, I am importing some raw voltage multichannel measurements into an R data frame. I need to scale each column with the respective sensitivity for that channel. I figured how to do it, but I am curious if there isn't a more elegant way. Now I start with something like this: rawdata <- data.frame(rbind(c(1,2,3), c(4,5,6))) sens <- c(2,4,6) and I do this: data <-
2008 Mar 25
1
Combining several mappings in ggplot2
Hello, I want to be able to make a plot that has several series with different color and linetype. Online documentation suggest that this is possible, but I haven't found how: "We can also create redundant mappings, mapping the same variable to multiple aesthetics. This is most useful when producing a graphic for both colour and black and white display." Here's what I have to
2008 Feb 07
1
How to split a factor (unique identifier) into several others?
Hello, I have a data frame with a factor column, which uniquely identifies the observations in the data frame and it looks like this: sample1_condition1_place1 sample2_condition1_place1 sample3_condition1_place1 . . . sample3_condition3_place3 I want to turn it into three separate factor columns "sample", "condition" and "place". This is what I did so far: #
2008 Feb 25
1
Plotting series marked with a symbol on every nth data point, preferably in ggplot...
Hello! I am working with signals and a plot of several signals on the same axes can get quite messy. With lines that are very fractured, distinction by only the linestyle is not very clear. If I add symbols to the plot however, there are so many symbols, that they overplot and the whole plot is unreadable once again. I am looking for advice on how to make a plot with continuous lines and symbols
2008 Feb 07
1
Bode plots in ggplot2
Hello, I am trying to figure out how to make a bode plot (a.k.a. bode diagram) in ggplot2. An example of such a diagram can be found here: http://meweb.ecn.purdue.edu/~me475/ctm/freq/bode2.GIF The example above shows the gain and phase characteristic of a linear system. In my case, I would like to compare visually several systems on the same diagram. The data in the data frame is arranged
2007 Jun 17
1
[ggplot2] Change color of grid lines
Hi, I am making myself familiar with ggplot2 (I really like the examples at <http://had.co.nz/ggplot2/>). One thing that really annoys me is the default use of white grid lines and a gray background [1, 2]. I simply would like to have black grid lines and a white background. No problem, I thought, "This is R. There is no if. Only how." (fortune("Simon Blomberg")).
2008 Mar 26
2
Moving data between R and Matlab back and forth?
Hi to the list, I am trying to find a way to painlessly move structured data back and forth between R and Matlab (also Octave). For this purpose I found the R.matlab package great help. I wish to use a Matlab -v6 MAT file as an intermediary format, because it is well read by both Matlab and Octave. It is also well read by 'readMat' function in R.matlab package, but that is where I run
2007 Nov 12
1
Tick mark puzzle.
I am bewildered by the behaviour of tickmarks as demonstrated by the following code. (What I'm trying to do is draw a single tick mark extending from the axis all the way down to the tick label, which is two lines from the axis to make sure it doesn't overlap with the ``ordinary'' tick labels.) # Try 1: # Gap between tickmark and label. plot(1:10) axis(side = 1, at = 2.35,
2005 Nov 02
2
Orientation of tickmarks labels in boxplot/plot
Hi, I have been trying draw tickmark labels along the y - axis perpendicular to the y axis while labels along the x - axis parallel to x axis while making box plot. Here is my test dataset. TData ID Ratio 1 0 7.075 2 0 7.414 3 0 7.403 4 0 7.168 5 0 6.820 6 0 7.294 7 0 7.238 8 0 7.938 9 1 7.708 10 1 8.691 11 1 8.714 12 1 8.066 13 1 8.949 14 1 8.590 15 1 8.714 16 1
2008 Mar 24
1
How to assign multiple return values
Hi, I am moving from MATLAB, where one can easily assign a number of output values from a function like this: [x,y] = myfun(a,b) Then variables x and y can be directly used in the caller workspace. I understand that R functions return a single argument, which could be a list. This in a way makes it possible to return multiple values with a single function call, but accessing the list variables
2006 Feb 21
2
rotated labels in barplot with beside=T and multiple groups
I have a data set that I display using barplot. I don't know what you call it, but when I look at it, it looks like this: > lsu (0,0.1] (0.1,0.2] (0.2,0.3] (0.3,0.4] (0.4,0.5] (0.5,0.6] A 0.052631579 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 B 0.000000000 0.000000000 0.001007049 0.003021148 0.000000000 0.000000000 E 0.200000000 0.000000000
2003 Apr 07
1
Problems building the java/jdk14 port
Hi there. I am unable to build the java/jdk14 port. I downloaded the patches and source distribution, and get some weird HotSpot error. I am not sure what the problem could be. Following is the relevant output of make on the port. Any ideas? -- Tom # Start of jdk build bsd i586 1.4.1-p3 build started: 03-04-07 12:16 Syntax error: "(" unexpected gmake[1]: Entering directory
2008 Mar 27
2
Rule for accessing attributes?
Hi ! I am a new user and quite confused by R-indexing. Make a list and get the attributes lst <- list(x = 1:3, y = 4:6, z = 7:9) attributes(lst) This returns: $names [1] "x" "y" "z" I can easily do: nm <-names(lst) or nm <-attr(lst,"names") which both return the assigned names of the named list 'lst', but why then this doesn't
2012 Jun 22
6
axis in r plot
I have a graph plotted in r.The x axis tickmarks are at 0,5,10. I need a graph with resolution of tickmarks at 0.1 interval.When i place tickmarks of 0.1 intervals using the following command axis(1, at=seq(0,5,0.1), cex.axis=0.7, las=2) I only get the tickmarks of 0.1 interval that are very closed placed in the graph.I need to increase the spacing between each tickmark. Please anyone help out
2018 Mar 04
1
2.2.34 fails to build on OpenBSD
Trying to build Dovecot 2.2.34 on OpenBSD fails. This seems to have been introduced by this commit.. https://github.com/dovecot/core/commit/4a9020ed888caf03fd3132a30a7818b01daa4b9d Fairly -current.. /usr/bin/libtool --tag=CC --mode=link cc -std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
2002 Apr 12
1
persp(): z-axis annotation overwrites numbers at tickmark
Dear R-users first, thanks to Paul Murrell for fixing my problem "What line is labeled in persp()". It works great now (in the development version). One more question (I don't know if it's related to the "old" problem): the annotation on the z-axis overwrites the numbers at the tickmarks and sometimes, if numbers are pretty long, the numbers themselfe overlap the
2018 Apr 25
1
Can't Get Lattice Histogram Minor Tick Marks to Work
Thanks Jeff, I attached a file with the program to my earlier email because the posting guide seemed to imply that non-binary attachments would work. But I see that the file was stripped off. I installed the program file on a web site, but when I downloaded it, the line breaks were stripped out. So I've included the program below: ------------------------------------------------------- #
2006 Mar 04
1
xyplot/levelplot: thickness of tickmarks
Hi, if I use the xyplot (or levelplot) function (lattice library) with the option axs="i", I have the problem that the tickmarks lie a bit outside the "plot-box". Consider for example: library(lattice) x<-seq(0,1,by=0.01) y<-seq(0,1,by=0.01) xyplot(y~x,type="l",xlim=c(0,1),ylim=c(0,1),scales=list
2005 Feb 05
1
Labelling and formatting of graphics
In the output of the code below, I want to do the following: - get hats over some of the betas - get the polygons stippled, not coloured grey - remove the tick marks at the ends of the axes. If I put tick = false, the whole axis disappears. betahat <- c(0.04*0:150) betahatdens <- dnorm(betahat, 3, 1) plot(betahat, betahatdens, xlim = c(-0.2, 6.2),