Displaying 20 results from an estimated 1000 matches similar to: "Layout() coordinates and drawing lines / segments"
2008 Jul 11
1
TeachingDemos question: my.symbols() alignment problems in complicated layout
Hello,
After usefull suggestions by Paul Murrell, i have been trying to use
my.symbols to plot arrows of varying angles on my plot in order to create
a time series of wind direction... however,i have been unable to figure
out how the allignment of symbols works...
below i have included a simplified code that illustrates my problem:
(i am creating a .ps file ... so i've included this in my
2007 Jul 28
2
specing a call to render :layout => "some_layout"
I''m trying to specify that an action should be rendered with a given layout
one particular spec.
What I''ve got at the moment is this.
it "should render with the grabber layout" do
controller.should_receive( :render ).with( :layout => "my_layout" )
do_get
end
This doesnt work even though this call to render is being executed.
render :layout
2012 Oct 31
10
Gráfico von varias variables
Estimados amigos,
Tengo el siguiente set de datos:
caps <- datos[datos$NombreDepartamento=="LANUS", c("CAPS", "personas",
"PersonasRCVG", "Con12Meses")]
caps$prevalencia <- round(caps$PersonasRCVG/caps$personas*100,1)
caps
CAPS personas PersonasRCVG Con12Meses prevalencia
2345 2345 1347 132 211 9.8
2363
2009 Mar 20
1
Howto Supress Extra Blank Page in gridBase
Dear all,
I have a simple plot using "gridBase" like this.
The problem occurs whenever I execute this code
there is always a blank page created before the actual plot.
How can we disable that blank page?
I am using: R version 2.7.2 (2008-08-25)
and gridBase version: 0.4-3
__ BEGIN__
library(grid)
library(gridBase)
opar <- par(no.readonly=TRUE)
par(opar)
grid.newpage()
2012 Sep 02
2
Impact of cex changing as a function of mfrow
R 2.15.1
OS X (MLion)
Colleagues,
I am aware that changes in mfrow / mfcol in par() affect cex (from help: In a layout with exactly two rows and columns the base value of ?"cex"? is reduced by a factor of 0.83: if there are three or more of either rows or columns, the reduction factor is 0.66).
I generate a multipage PDF in which mfrow varies such that cex is impacted. This affect
2004 Aug 02
4
How to add a common title (or xlab, ylab) for multi-plots in the same window?
Dear R people,
I am using par(mfrow=c()) to plot multi-figures in the same window. And I like
to put a common title (and xlab, ylab) for all of plots. I have already left
some margin by resetting omi values in par() and hided all (xlab, ylab) for
each sub-plot. Could anyone tell me how to do that?
Thanks a lot,
Frank
2004 Sep 07
1
gridBase and heatmap
I would like to use gridBase to place four separate heatmaps (actually,
a stripped-down heatmap.2 from ght gregmisc package that contains only
the "image" part) into four different viewports. I can get the
placement correct, but I keep 'losing' the previous plot. Any
suggestions?
Here is some quick example code trying to put a heatmap into the left
viewport and then
2008 Feb 18
1
Plotting a legend outside the figure - units
Dear R gurus,
I am trying to plot a legend in the margins of a figure. The basic idea is to have two (or more) plots on the same figure, but then to have a common legend at the bottom of the plot. The approach that I have taken is to setup the figures, then do a "dummy" plot of the legend to determine the height of the legend box (ie from the value returned by the legend() command). I
2012 Sep 25
1
Bug or misunderstanding of par(pin)?
Dear all,
I am currently trying to create a plot showing multiple single plots, for
which the important issue is that the size of each plot region (not figure
region!) has to be of a fixed dimension (in my case: width=1 inch, height=
0.87 inches).
I tried to use "pin" to fix the plotting region to a specific size, but
without success.
The following example will visualize the problem:
2009 Jun 22
2
Help needed: Fraction for Histogram > 1 ???
I have been trying to draw histogram for my manscript and found some strange
things that I could not figure out why.
Using the same code listed below I have successfully draw histograms for a
few figures with fraction labeled on Y axis less than 1 (acturally between 0
to 0.1). But one dataset gives the Y axis label 0 to 5 as fraction. This
is not true, as fraction are less than 1, although the
2008 Jul 02
2
position legend below x-axis title
Dear helpers,
I'm using a R script on several different datasets, which makes that
axis scales may vary quite a lot from dataset to dataset. So what I'm
looking for now, is how to automagically find out how to position the
legend (horizontal) in the space below the x-axis title, and how to
make sure that the legend is within the limits of the lower inner or
outer margin?
I'm aware of
2003 Dec 06
1
pdf() function, screen command and graphs
Dear [R]-list,
I am trying to do a pdf() of the following graphs but don't understand
why the pdf() function does produce an empty pdf file.
(I use R1.7.0 on MacOS 10.2.8)
any idea? Is pdf() incompatible with screen?
Thanks a lot,
DLC
## create dataset
x=rnorm(1000,10,2)
y=rpois(1000,5)
## graphs
pdf()
par(col.main=4,omi=c(0,0,1.25,0))
split.screen(c(1,2))
2010 Jun 10
1
Issues with Bar Graph
Hello all!
I am relatively new at R and was having a few issues with the following
graph:
barplot(c(5724.688,7290.7875), ylab=expression(paste(Delta, "AUC 45-200 min
(?g/ml * 155 min)")), xlim=c(0,2), width=0.5,
border="black",font.lab=2,cex.lab=1.7, names.arg=c("Saline (n=8)", "Exendin
(9-39) (n=8)"), axisnames=TRUE, cex.names=1.7, ylim=c(0,9000),
2011 Aug 15
1
Font size R
Hi everyone.
I'm using this following code:
pdf(file="Fig5.pdf", width = 4.86, height = 6.29, pointsize = 10, family
='Times')
par(mfcol = c(3,2), mai = c(0.4,0.8,0,0), omi = c(0.7, 0, 0.7, 0.1));
hist( rnorm(100) )
dev.off()
When I open this in any vectorial software (like Illustrator), it says that
my font size is 7 instead of 10 that I specified.
I have tried
2013 Jan 07
1
Changing mtext direction, or using text for the margin?
Hi all,
I have read through the archives, but can't find a solution to this problem.
I need the text direction on "dependent B", plotted in margin 4, to go
top to bottom (opposite what it is now). Here's some sample code:
#plot with mtext example
par(mgp = c(2,1,0), mfrow=c(2,2), las=1, mar=c(2,2,2,2), omi=
c(0.5,0.2,0,0.2))
a<-1:10
b<-7:16
c<-21:30
plot(a~b,
2012 Jun 26
2
Drawing (lon,lat) coordinates onto the image of a world
Given a set of latitude and longitude coordinates pairs (stored in variables "latitudevals" and "longitudevals"), I would like to plot them onto the image of a equirectangular world map. I would like to plot each coordinate pair with a red circle, if possible. Does anyone have any suggestions as to how I go about doing this, whether using R or using another program like Google
2011 Mar 10
1
Main title in a multiple display of graphs
Hello!
I want to display four xyplots in the same window (sorry if I don't use the propers words, but my English is rude)
I know that if I use plot(y~x) then
x=(1:100)
y=(1:100)
par(mfrow=c(2,2))
plot(y~x)
plot(y~x)
plot(y~x)
plot(y~x)
would give what I want, but this is not the case because I need the functions of xyplot.
So I did the following:
plot.new()
2008 Apr 08
1
plot function / par() settings
Dear all;
I'm trying to create a 2 x 3 plot (something I know like lattice can
do better) using the plot function. However; I'm not sure how to make
the width of the plots to be the same on each column. I guess the
answer maybe obvious but I haven't been able to figure it out. I'll
appreciate any suggestion. Here is the (highly inefficient) code for
the first row:
par(mfrow =
2003 Apr 07
4
Justifying only the X-label
In the attached plot, how do I move just the X-label(Time) to the right.
Basically, I just want to do a par ( adj = 1) on just the X-label, not
all my labels. Any ideas how to accomplish this?
Thanks,
Tony
Tony Vargas
Cisco Systems
Engineering Computing Services
(408) 525-4113
tvargas at cisco.com
-------------- next part --------------
my.yugo.Apr.2003.other.info <-
2005 Oct 08
1
add leading 0s to %d from png() {was Automatic creation of file names}
Dear useRs,
Is there a way to 'properly' format %d when plotting more than one
page on png()? 'Properly' means to me with leading 0s, so that the
PNGs become easy to navigate in a file/image browser. Lacking a better
solution I ended up using the code below, but would much prefer
something like
png("test_%d.png",bg="white",width=1000,height=700)
where %d