Displaying 20 results from an estimated 3000 matches similar to: "Changing color of points in violin plot"
2011 Mar 24
1
Colour makes my life; but not my bwplot (panel.violin)
Using Trellis, am successfully setting up a number of panels (25) in which I
have two box and violin plots.
I would like to colour - one plot as RED and the other as BLUE (in each
panel). I can do that with the box plots, but the violin density areas just
take on one colour.
My basic call is as follows:
bwplot(rmsd ~ file | code,
data=spread_data.filtered,
panel = function(...,
2005 Nov 10
2
ltext - adding text to each panel from a matrix
Hi all (really probably just Deepayan):
In the plot below I want to add text on either side of each violin plot that
indicates the number of observations that are either positive or negative.
I'm trying to do this with ltext() and I've also monkeyed about with
panel.text(). The code below is generally what I want but my calls to
ltext() are wrong and I'm not sure how to fix them.
2010 Jan 12
2
Placing eps files from R into Adobe InDesign documents: specifying fontfamily
This is a solution I am posting for a problem that others may have.
If you want to:
1. Place lattice graphics from R into an Adobe InDesign document, and
2. Use the export as eps function in R to maximize resolution (it is much
better than exporting as a metafile or bitmap), and
3. Use long strings of text in your titles or captions or to label your
axes.
Then you will have problems because:
2011 May 06
1
Weighted box or violin plots in Lattice?
Is it possible to create weighted boxplots or violin plots in lattice?
It seems that you can specify weights for panel.histogram() and
panel.densityplot(), but not for panel.bwplot or panel.violin().
Please let me know if I've missed something in the package documentation.
Thanks!
--
Raphael D. Mazor
Freshwater Biologist
Southern California Coastal Water Research Project
3535 Harbor Blv
2010 Dec 23
1
Vioplot / list help
Hi,
I have some data (lots of year,distance pairs), which I can
straightforwardly boxplot:
dists <- read.table("movedists.dat")
with(dists,plot(as.factor(V1),V2))
If I want to plot these data as violin plots using vioplot, this
approach doesn't work:
> with(dists,vioplot(as.factor(V1),V2))
Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, :
min not
2012 Jun 13
2
add horizontal reference lines in lattice bwplot
I'm plotting a lattice bwplot from a data.frame and would like to add some horizontal lines indicating some reference values (preferably with text annotation) as well as a grid of regular log tics. The following illustrates the plot:
data(ToothGrowth)
require("lattice")
p = bwplot(exp(len) ~ supp, ToothGrowth,
panel = function(..., box.ratio) {
panel.grid(h=-1,
2008 Jan 18
1
gboxplot (JMP Diamond plot in R?)
I am looking to replicate the functionality of the JMP diamond plot in R. I have found the following enhancement and no other references(see below). I have tried to contact the author via email and I have had no luck.
Does any know if this functionality exists in R? If it does not does anyone know how to contact the author of the enhancement request?
"Hi,
I experimented with a set of S
2009 Nov 16
2
violin - like plots for bivariate data
I'm attempting to produce something like a violin plot to display how y
changes with x for members of different groups (My specific case is how
floral area changes over time for several species of plants). I've looked at
panel.violin (in lattice), which makes nice violin plots, but is really set
up to work on a single variable - the area trace represents the frequency of
each value of x
2008 Feb 19
1
Two bwplots in one single graph
Dear list,
With the below codes, I got 8 bwplots but I would like to put 2 bwplots in one single graph so that instead of 8 separate bwplots I would have 4 graphs, each contains 2 bwplots. How can I do that?
Another question is how do I add the mean as a point to each boxplot in the bwplot but also keeping the median line.
for (i in 1:length(dat)){
windows()
with(dat[[i]],
2006 Feb 26
2
How to produce notches in bwplot?
Dear r-helpers,
tst <- data.frame(as.numeric(x <- 1:20), f <- rep(c('hi','lo'), times
= 10))
with(tst, bwplot(f ~ x, panel = function(x, y){panel.bwplot(x, y, pch
= '|', stats = boxplot.stats, fill = 8, varwidth = T)}))
I can't figure out from the documentation how to tell stats that I
would like to see notches or (even bands).
Here is what I've
2012 Nov 03
1
Violin plot of categorical/binned data
Hi,
I'm trying to create a plot showing the density distribution of some
shipping data. I like the look of violin plots, but my data is not
continuous but rather binned and I want to make sure its binned nature (not
smooth) is apparent in the final plot. So for example, I have the number of
individuals per vessel, but rather than having the actual number of
individuals I have data in the
2010 Apr 24
2
left-to-right series of box and whisker plots from a csv file
Hi,
I've got a csv file with scores like this:
40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,32,38,40,20,40,26,40,30,40,5,5,13,12,40,40,3,33,29,23,2,24,9,15,4,21,16,5,26,8,8,18
40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,32,40,40,30,40,40,37,34,40,36,13,40,13,40,5,40,8,29,5,15,34,5,22,14,20
2005 Oct 26
2
horizontal violin plots?
I am trying to make horizontal violin plots. I have tried both vioplot
and simple.violinplot, but both of them seem to not be willing to take
the horizontal option. Is this correct, or am I just bungling it
somehow?
For instance, for vioplot (from the example shown, with the horizontal
modification):
> vioplot(bimodal,uniform,normal, horizontal=TRUE)
Error in median(data) : need numeric data
2012 Sep 28
2
changing outlier shapes of boxplots using lattice
Hello
This is Elaine.
I am using package lattice to generate boxplots.
Using Richard's code, the display was almost perfect except the outlier
shape.
Based on the following code, the outliers are vertical lines.
However, I want the outliers to be empty circles.
Please kindly help how to modify the code to change the outlier shapes.
Thank you.
code
package (lattice)
dataN <-
2008 May 05
2
bwplot
Hi,
I have 2 questions about bwplot in R :
1) How to change the order of my different boxes in the graph ?
2) How to rename the names of the differents boxes ? because I know
how to do that with boxplot (using names) but I do not find the
equivalent parameter in bwplot.
thanks,
C?dric
2010 Sep 20
1
Adjusting Font Size: lattice / bwplot
Hello,
If you run the following code with lattice installed:
bwplot(voice.part ~ height, data=singer, xlab="Height (inches)")
There will be some text in the graph e.g. Soprano 1, Soprano 2, etc -
60, 65, etc and the title: Height (Inches). How can one make the font
for this text larger and/or bold? Also, is there a way to thicken or
bold the lines of the box and whisker plot?
Thank
2010 Nov 02
1
Colour filling in panel.bwplot from lattice
Inspired by colouring the dots of box-whisker plots I am trying to also
fill the boxes (rectangles) with different colours. This seems not to
work as I expected.
Looking at the help page of panel.bwplot it says: 'fill - color to fill
the boxplot'. Obviously it is only intended to fill all boxes with only
one colour?
Nevertheless the following example shows, that 'fill' from
2012 Sep 24
3
boxplot of different colors
Hello,
I am making a boxplot of 13 boxes.
I tried to color the box using 13 colors but failed.
Only red and brown were displayed.
Green, blue, and grey disappeared.
Please kindly advise modification after checking the code below.
Thank you in advance.
Elaine
R code
# data input
dataN
<-read.csv("H:/a_mig_distance_B_NB/R_data/Mig_bird_586_20120925.csv",header=T,
row.names=1)
2004 Nov 06
1
basic bwplot query
Hi -
I have some data consisting of a number of observations within each of
15 countries. Each country falls into one of two groups. I'd like to
use the lattice library's bwplot to present boxplots of the
country-level data, with a separate panel for each group, but showing
only the relevant countries in each panel. Here's an analogous example
using the "singer" data
2012 Aug 15
4
boxplot help
Hi, im a newbie with very wobbly coding abilities.
Tearing my hair out over getting the boxplot i want...
I have a dataset called 'eagle' which consists of year (2011 or 2012), month
(jan - dec), roof (TT6, TT13 or BARE) and temp (the continuous variable that
i want to plot).
So i want boxplots of the three roof treatments in every month organised in
chronical order along x axis 2011 -