Displaying 20 results from an estimated 1000 matches similar to: "lattice: index plot"
2006 Oct 02
2
xyplot Graphic Help
I have the following graphic where I drop unused factors in the x axis, however I cannot get the first point on the second panel. It seems shifted. Any ideas?
The example is below:
data <- data.frame(
Room=as.factor(c(132,132,132,132,132,132,132,132,132,196,196)),
2011 Aug 12
1
current.panel.limits() of lattice returning NaN limits - why?
Hi,
I need a custom axis function for a plot, but it seems
that current.panel.limits() sometimes returns NaN limits for the plot, which
it much harder to calculate anything sensible.
An illustration:
Given this axis function:
vs.axis <- function(...){
xlim <- current.panel.limits()$xlim
ylim <- current.panel.limits()$ylim
# Debug code
print(list(ylim=ylim,xlim=xlim))
2010 Aug 30
1
lattice: limits in reversed order with relation="same"
Hi everybody,
I want an x-axis which has xlim=c(max, min) rather than xlim=c(min, max)
in order to reflect the type of the process (cooling):
library(lattice)
myprepanel <- function(x,y,...) list(xlim=rev(range(x)))
x <- rep(1:10, 100)
z <- factor(sample(10, 1000, T))
y <- rnorm(1000, x, as.numeric(z))
xyplot(y~x|z, scales=list(x="free"), prepanel=myprepanel)
This works
2010 May 25
2
segplot (latticeExtra)
Hi,
I'm having a bit of trouble with 'scales="free"' in the segplot()
function of latticeExtra. Say we need panels for each year, showing
only those counties that are represented in each one:
---<--------------------cut here---------------start------------------->---
library(latticeExtra)
data(USCancerRates)
uscr.w <- subset(USCancerRates, state ==
2008 Nov 20
1
Math Expression in 3D Plots
Is there anyway to label axes in 3D plots with mathematical expressions?
In the code below, I want to replace "delta_yrsed" with what "\Delta
\widehat{yrsed}" represents in TeX, but the [xyz]lab parameters of title3d
appear to only accept character strings.
require("rgl")
fn.delta.yrsed <- function(dist, delta.dist,
2001 Aug 30
1
How to get ``nn%'' in axis values
I would like to make the print format of the axis value labels appear as
``nn%'' instead of just the numbers. Is there a way to do this?
Also, the x axis value labels on my horizontal barplot are rotated 90 degrees
(perpendicular to the axis) no matter what I do. I tried las=1 but that didn't
work. Is this doable?
Thanks.
$platform
[1] "i686-pc-linux-gnu"
$arch
[1]
2006 Oct 12
2
adding error bars to lattice plots
Dear R users,
About a year ago Deepayan offered a suggestion to incorporate error bars
into a dotplot using the singer data as an example
<<http://finzi.psych.upenn.edu/R/Rhelp02a/archive/63875.html>>.
When I try to utilize this code with a grouping variable, I get an error
stating that the subscripts argument is missing. I have tried to insert
them in various ways, but cannot
2006 Jun 06
2
error bars in lattice xyplot *with groups*
Hi all,
I'm trying to plot error bars in a lattice plot generated with xyplot. Deepayan
Sarkar has provided a very useful solution for simple circumstances
(https://stat.ethz.ch/pipermail/r-help/2005-October/081571.html), yet I am
having trouble getting it to work when the "groups" setting is enabled in
xyplot (i.e. multiple lines). To illustrate this, consider the singer data
2009 Jul 21
2
animated grid graphics
I need to make a fairly complex animated graphic and decided to use grid for it.
A very simple example of what I need:
##==============================================================================
library(grid)
grid.newpage()
pushViewport(plotViewport())
pushViewport(viewport(xscale = extendrange(c(0, 100)),
yscale = extendrange(c(0, 100))))
grid.xaxis()
grid.yaxis()
2010 Jan 14
1
lattice dotplot with missing levels in factor variable
Hi,
I am trying to create a dotplot where each panel shows levels vs.
responses; the levels are sorted by responses but levels vary from one
panel to another. However, I run into problems with controlling the
y-limits and y-labels.
In particular, suppose I have a data frame
rsp <- c(10,2,4,0,2,3)
lvl <-
2008 May 06
1
Plotting separate populations in scatterplot3d
Hi,
I'm having trouble plotting populations as separate colors and points in the
3d scatterplot package. I have a column with 4 different population names
and 3 columns with my data. I want to plot each population with a different
color and pch. In addition, I want to use the type="h" in my plotting so
that I can see the points clearly in my graph( for publication purposes).
2006 Mar 01
2
lattice-Internal
Hi,
The functions prepanel.default.bwplot() and lpretty() are not running in Deepayan's
barley example concerning vertical bars with the lattice function barchart().
Why, is there a restricted use for the package lattice-Internal?
Urs Simmen
mailto:usimmen at dtc.ch
2014 Feb 03
1
seq range argument
Hello dear developers,
I find myself often having the result of "range" oder "extendrange", which I want to create a sequence with.
But "seq" needs two seperate arguments "from" and "two".
Could an argument "range" be added?
Otherwise I will have to create an object with the range (may come from a longer calculation), index twice from
2008 May 03
4
interactive rotatable 3d scatterplot
I would like to create a 3d scatterplot that is interactive in the sense
that I can spin it on its axes to better visualize some PCA results I have.
What are the options in R? I've looked at RGL and perhaps it will suffice
but it wasn't apparent from the documentation I found.
Any demo scripts available for a package that will work?
Mark
--
Mark W. Kimpel MD ** Neuroinformatics **
2010 Feb 20
3
Error Bars in lattice- barcharts
Hello,
I am attempting to write a script that adds error bars to a barchart. I
basing my attempt heavily on the following thread:
http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2791.html
I can't seem to get around the problem that was discussed in the thread. The
following example should illustrate my problem. Sorry about the messy
example but I am 1) trying to make it as close as possible
2012 May 17
3
New Eyes Needed to See Syntax Error
One of many scripts to produce 4 lattice plots on one page keeps throwing
an error. I've tried manipulating the file to eliminate the error, but have
not been able to do so. The error is:
> source('bicarb.R')
Error in source("bicarb.R") : bicarb.R:15:1: unexpected symbol
14: 15: hco33
^
The 'h' is in column 0 so the caret would be column -1, but it's
2006 Sep 15
2
dotplot, dropping unused levels of 'y'
In dotplot, what's the best way to suppress the unused levels of 'y' on
a per-panel basis? This is useful for the case that 'y' is a factor
taking perhaps thousands of levels, but for a given panel, only a
handfull of these levels ever present.
Thanks,
Ben
2008 Dec 17
1
Shrink Trellis margins settings (when printed to png file)
Dear R-experts,
I have two problems:
PROBLEM (1)
-----------
I want to produce a very small png file (35 x 18 px) that contains a
histogram without a figure region or margins, only the pure heights.
In the base graphic system this is simple:
png(filename = "hist.png", res = 72, width=35, height=18)
par(mar=c(0,0,0,0), oma=c(0,0,0,0))
hist(rnorm(100),
2011 Dec 22
2
Axis manipulation in Stackpoly (Plotrix)
Have made a stacked area plot, but now want to manipulate the x axis: make in even increments (50) in order to suppress the tick marks (forming solid bar under plot). However, the plot functions do not seem to work, and I cannot find documentation for use of xat in stackpoly.
This is a time series of data covering 579 years, and has been successfully converted from zoo to matrix. Data plotting
2018 Apr 25
1
extendrange(): suggested improvement
Hi,
I often need to extend the plot range to the right, but not to the
left (for example: not below 0 so that log = "x" still works...). This
could be a handy improvement of extendrange():
--- utils.R 2015-08-25 18:18:20.000000000 -0400
+++ utils.R 2018-04-25 17:21:25.000000000 -0400
@@ -30,6 +30,6 @@
## Purpose: extend a range by a factor 'f' - on each side