Displaying 4 results from an estimated 4 matches for "rugplot".
2012 Jun 06
2
ggplot2: legend for geom_rug() ..?
...s(colour = X2)) +
geom_rug(subset = .(position < 14),aes(y=NULL),color="orange") +
geom_rug(subset = .(position > 14),aes(y=NULL),color="black")
This gives the plot correctly, but how can I add another legend that would
give some more information on the rugplot (e.g. that 'orange' line =
'London', and 'black' line = 'NYC')?
thanks!!
[[alternative HTML version deleted]]
2012 Dec 27
1
Regarding multiple axes in plots..
Hello,
I'd like to draw 2 plots in one graph.
Here is my code:
plot(data_min1$macd,main="1 min MACD",type="l")
lines(data_min1$macdsig,col="red")
par(new=T)
plot(data_min1$macdhist,type="h",main="")
axis(4)
par(new=F)
It seems it works.
But left axes of two graphs are over-drawn.
Could you let me know how to fix it ?
2011 Dec 13
2
axis tick colors: only one value allowed?
...an into this limit while trying to colorize the ticks as
plotted by rug() . There's an easy workaround, as the output of rug()
can be duplicated with something along the lines of
> points(mydata, rep(0.5, length(mydata)),
col=rainbow(20)[mydata*20/max(mydata)] )
So I can create color rugplots, but do wonder about enhancements to the
plot routines (albeit pretty silly enhancements).
As another side note: calling rug() with color set to '#00000033' lets
you see dense regions as darker than sparse regions, without having to
resort to calling jitter() first.
Carl
--
Sen...
2003 Jul 03
4
Generating a vector for breaks in a histogram
Hi
I have two lots of numbers which I would like to histogram using the hist() function. For comparative reasons, I want them to be on the same scale, which I can use the xlim and ylim options to achieve.
However, having them on the same scale is meaningless unless they have the same "breaks". Consulting the documentation, there are 4 ways of defining the number of breaks, only one