Displaying 20 results from an estimated 8000 matches similar to: "Secondary y axis"
2010 Feb 08
1
About scales in graphics
Hi,
I'm building two graphics just changing the scale to show
the graphic illusion.
The first graph would be 'correct'.
atend = c(410,430,450,408,408,405)
names(atend) = c('Janeiro', 'Fevereiro', 'Mar?o', 'Abril',
'Maio', 'Junho')
barplot(atend, las=1, xlab='Meses', ylab='N?mero de
atendimentos',
2012 Feb 09
2
Lattice 3d coordinate transformation
Hello List!
I asked this before (with no solution), but maybe this time... I'm
trying to project a surface to the XY under a 3d cloud using lattice.
I can project contour lines following the code for fig 13.7 in
Deepayan Sarkar's "Lattice, Multivariate Data Visualization with R",
but it fails when I try to "color them in" using panel.levelplot.
?utilities.3d says there
2007 Jan 23
1
How to generate 'minor' ticks in lattice (qqmath)
Dear group,
I tried to generate labels for every second tick in lattice (qqmath).
Version: 0.14-16
Date: 2006/12/01
R version 2.4.1 (2006-12-18)
An example:
library(lattice)
numy=100
y=runif(numy,min=0,max=1)
sig=0.05
numsig=length(which(y<sig))
tck.no=11 # number of ticks
tcks=1:tck.no
labl=as.character(0.1*tcks-0.1) # label for all ticks
labl[seq(2,tck.no-1,2)]="" # delete
2012 Sep 10
2
how to create a segplot in black and white?
Hi to all
I hope you can help me.
# I'm trying to plot the following ratio data with standard error bars
(horizontal).
ratioBiomass <- c(1.327, 0.865, 1.900, 0.992, 1.469, 1.381, 1.230,1.269,
2.411, 1.288, 1.861, 0.714, 1.341, 1.362, 1.065, 2.374)
SEratio <- c(19.28, 5.04, 0.01, 0.01, 0.90, 0.02, 0.002, 11.37,
0.004, 0.29, 0.003, 0.13, 0.21, 0.52, 1.66, 14.57)
Species <-
2009 Mar 10
1
North Arrow (.png file) on a Map
Hi list.
I would like to know how do I insert a North arrow, stored as a png file in
my computer, in a map? I found lots of post asking similar things, one of
them mentioned the pixmap package. The map was done using map() and
shapefiles (the code is below). I’m using the pixmap () and addlogo()
functions. Well I can import the png with pixmap() function (I guess, once
there’s no error message),
2010 Apr 19
2
Overlay of barchart and xyplot
Hello R Folks,
I am new to R. I have been struggling to overlay a barchart with a
xyplot together on one plot but did not get this worked out. Any help
and idea are greatly appreciated.
I attached R scripts for barchart and xyplot below and also data I used.
What I am trying to do is just to put the barchart and xyplot together
on one plot.
Huapeng
<<dispersal_infestation.csv>>
2010 Nov 08
1
Add text to a stacked barplot
Hi All,
I need some help in putting text in a stacked barplot. The barplot is filled
with 5 levels and now I would like to put text to each level in the stacked
barplot. However, it seems that the code that I am using is not placing the
text at the correct hight (centered at each fill) in the barplot. Any
suggestions to improve the code to make it work?
barchart(FREQ ~ VISIT
2009 May 06
1
Add trend line to XYPlot using a subset of the original data
I've created an xyplot that I want to add a trend line to using a subset of
the data.
The xyplot is
xyplot(X9444500~WY,data=mynewdata,xlim=c(1900,2020),ylab="TEST",
xlab="",ylim=c(100,100000),scales=list(x=list(at=c(1900,1920,1940,1960,1980,2000,2020),axs="r",tck=-1),y=list(log=TRUE,tck=-100,at=c(100,1000,10000,100000))),
panel=function(x,y,...) {
2000 Jul 12
1
plot.times error -- missing or illegal tck parameter (PR#601)
There seems no default setting for tck, causing problems
for plot.times()
> library(chron)
> dts <- dates(c("02/27/92", "02/27/92", "01/14/92",
+ "02/28/92", "02/01/92"))
> y<-chron(dts,out.format=c("dmy","h:m:s"))
> y
[1] 270292 270292 140192 280292 010292
> plot(y,1:5)
Error in axis(n, at =
2009 Apr 28
2
Change font type PNG device with Lattice xyplot
Dear All,
I have some problems with changing the default font (Arial) in a xyplot
which is printed using the PNG-device. Although some things have been
mentioned about this in the forum, I still couldn't figure it out. Can
someone help me out?n Thanks in advance!
I want to print the plot for pasting in Microsoft Word
OS: Windows XP
see example:
a<-data.frame(x=c(1:5),y=c(2,2,3,3,4))
2024 Jun 09
2
head.ts, tail.ts loses time
Hello, All:
The 'head' and 'tail' functions strip the time from a 'ts' object.
Example:
> head(presidents)
[1] NA 87 82 75 63 50
> window(presidents, 1945, 1946.25)
Qtr1 Qtr2 Qtr3 Qtr4
1945 NA 87 82 75
1946 63 50
Below please find code for 'head.ts' and 'tail.ts' that matches
'window'.
Comments?
2008 Aug 05
1
Labeling lines in xyplot
Hello,
I apologize in advance as this example seems really elementary. Below I
have created a simple scatterplot with lines. I would like to label
each line with the name of the village, instead of using a legend. Can
someone please let me know how to do it.
Thanks in advance -- John
Pop=c(1406,1862,2333,2664,2685,2521,2726,0,0,0,0,214,289,365,900,952,1002,1205,1041,942,1004,
2009 Dec 03
2
Formatting of numbers on y axis
Hello all. I have the following:
plot(salaries$yearID, salaries$salary, type='n', xaxt='n', xlab='',
yaxt='n', ylab='')
axis(1, at=unique(salaries$yearID), labels=unique(salaries$yearID), lwd=.25,
tck=-0.05)
axis(2, axTicks(2), format(axTicks(2), scientific = F))
Which nicely creates the Y axis with the raw numbers, which are in the range
of .5 - 7
2024 Jun 10
1
head.ts, tail.ts loses time
zoo overcomes many of the limitations of ts:
library(zoo)
as.ts(head(as.zoo(presidents)))
## Qtr1 Qtr2 Qtr3 Qtr4
## 1945 NA 87 82 75
## 1946 63 50
xts also works here.
On Sun, Jun 9, 2024 at 12:04?PM Spencer Graves
<spencer.graves at prodsyse.com> wrote:
>
> Hello, All:
>
>
> The 'head' and 'tail' functions strip the time
2024 Jun 10
1
head.ts, tail.ts loses time
Hi, Gabor et al.:
Thanks for this. I should change my current application to use either
zoo or xts, as Gabor suggests.
However, I was surprised to learn that "[.ts" does NOT return an
object of class "ts". I see that "head.default" and "head.matrix" both
call "[", so "head" cannot return a ts object, because "["
2024 Jun 10
2
head.ts, tail.ts loses time
>>>>> Spencer Graves
>>>>> on Mon, 10 Jun 2024 07:50:13 -0500 writes:
> Hi, Gabor et al.: Thanks for this. I should change my
> current application to use either zoo or xts, as Gabor
> suggests.
> However, I was surprised to learn that "[.ts" does NOT
> return an object of class "ts". I see that
2013 Jun 10
1
Using Lattice, LatticeExtra - Hide right and top axes in multipanel plots
Dear Rxperts,
How do I hide the top and right axes in multiple panel plots? A couple of
examples are provided below.. Would highly appreciate appreciate your
assistance..
#Example 1
library(latticeExtra)
xyplot((1:200)/20 ~ (1:200)/20, type = c("p", "g"),
scales = list(x = list(log = 2,alternating=0), y = list(log =
10,alternating=0)),
xscale.components =
2024 Jun 11
1
head.ts, tail.ts loses time
It isn't really clear that it can't work. This does work by inserting NA's.
library(zoo)
as.ts(as.zoo(lynx)[ c(1:3, 7) ] )
## Time Series:
## Start = 1821
## End = 1827
## Frequency = 1
## [1] 269 321 585 NA NA NA 3928
On Mon, Jun 10, 2024 at 10:32?AM Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>
> >>>>> Spencer Graves
2024 Jun 10
1
head.ts, tail.ts loses time
Hi, Martin et al.:
On 6/10/24 9:32 AM, Martin Maechler wrote:
>>>>>> Spencer Graves
>>>>>> on Mon, 10 Jun 2024 07:50:13 -0500 writes:
>
> > Hi, Gabor et al.: Thanks for this. I should change my
> > current application to use either zoo or xts, as Gabor
> > suggests.
>
>
> > However, I was
2010 Mar 16
1
labels gone
Dear R users:
I am drawing a graph with the following code:
Tau<-seq(0.05,0.95,0.05);
Pi <- seq(0.19,0.01,-0.01);
par(cex.axis=0.8,ps=9,mar=c(1.5,1,0.5,1), oma=c(1,1,0.2,1) ,tck=-0.01);
plot(Tau,Pi, type='l', xlab="Tau",ylab="Pi",col=4);
I want to make the graph take as little space as possible. Here I run into
two problems. One is that the labels are gone, the