Displaying 20 results from an estimated 9000 matches similar to: "legend position help"
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
2009 Jan 14
4
How to get legend outside of plot?
I am creating a CDF plot function more user-friendly than any default r
function. Depending upon the bimodality of the data (it is often bimodal),
or any other strange data trends, the points can end up gathering in just
about any corner of the plot. So, when I add a legend, whether I choose to
add it in the bottom right, top left, or wherever, it will sometimes end up
putting the legend right
2010 Jan 12
1
Multiple symbols per single line in a legend
Hello everybody,
Is it possible to coax legend() into displaying more than one simbol per
line in legend? I have a graph like the one attached to this mail; I would
like to reorganize the legend in such a way that the duplicate text would be
omitted, i.e., the first line would read <square> <triangledown> "increasing
frequency" and the second one would read <circle>
2010 Jun 29
5
More than two font in a plot
Hi there,
I am a Chinese R user. I hope to display Chinese character in a plot,
and than save it in PostScript format. I have read the article titled
"Non-Standard Fonts in PostScript and PDF Graphics", especially the
section about CJK fonts. I also tried the code:
> pdf("chinese.pdf", width=3, height=1)
> grid.text("\u4F60\u597D", y=2/3,
2008 Sep 04
2
Adding a legend to R graph device with several plots (no to individual plots!)
Dear Users, I already posted this question: it either went unnoticed,
or it is to basic (if this is so, please sent me a hint).
I would like to know if there is a way to add a common
legend to an arrangement of plots. In the example below, I get four
plots in my device. each one has a density for 1995 and one for 2006.
I have found that using legend or smartlegend I can add a legend to
each plot,
2017 Dec 13
4
difference between ifelse and if...else?
Hi there,
I don't know why the following codes are return different results.
> ifelse(3 > 2, 1:3, length(1:3))
[1] 1
> if (3 > 2) 1:3 else length(1:3)
[1] 1 2 3
Any hints?
Best,
Jinsong
2020 Oct 20
1
write.csv covert Åland to <c5>land
It looks like an encoding problem.
It works fine for me with R encoding set to UTF-8
Here is part of my sessionInfo() results
[1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8
[5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8
I would suggest issuing the command
sessionInfo()
and seeing what your encoding is.
On Tue, 20 Oct 2020 at 08:22,
2010 Jun 30
2
plain text in Chinese can not be set
Hi there,
According to ?par, 'font' is an integer which specifies which font to
use for text, that 1 corresponds to plain text (the default), 2 to bold
face, 3 to italic and 4 to bold italic.
When I test Chinese character in pdf(), I found that 1 to bold face, 2
to italic, 3 to bold italic, 4 to symbol. and I don't find how to set
plain text. In the following code, the font to use
2006 Apr 10
2
Legend in the outer margin
Dear Rs
I have a 3x3 multiple plot. I would like to have a overall legend in
the outer right margin.
From the help archive, I found that it can be done by setting
par(xpd=NA). However, I couldn't find the correct values
for x and y co-ordinates for the legend. Please find the code snippet below:
par(mfrow=c(3,3), mar=c(4,4,0.9,0.5), oma=c(1,2,2,4),cex.main=1.1)
2002 Nov 12
4
trouble positioning legends on barplot written to a file
I'm trying to generate some plots for print publication and I'm having trouble
getting them the way I want. I get a plot with a legend that overlaps the bars
and looks bad. Also, I'm saving this as PDF file (whatever happened to the
"png" function to save as PNG format, in r 1.4.1?)
I've tried a number of things, which produce a number of questions.
1) it seems that the
2023 Mar 31
1
single character in R, and how to manipulate it
Hi Jinsong,
Maybe "srt" will do what you want. As you noted non-orthogonal
rotations may not work on some devices. You may be able to download
mirror fonts from places like fontmirror.com, but it more complicated.
Jim
On Thu, Mar 30, 2023 at 7:25?PM Jinsong Zhao <jszhao at yeah.net> wrote:
>
> Hi there,
>
>
> I just noticed that "crt" is a graphical
2009 May 06
1
Positioning a legend via X and Y coordinates
Dear R Users,
I'm able to display a legend using the following code:
> legend("topright", c("Simulation", "Observation"), fill=2:3, bty="n")
However, this causes the legend to be positioned too close to the bars in my barplot. I'd like to move the legend up slightly. I have been trying to determine the necessary values by trial and error to do
2010 Jan 20
2
legend in multiple plot
Dear R users,
I'm making multiple plots within the same pdf page (par(mfcol = c(5,1)), and
want a legend for this at the bottom of all the plots. From previous mails
it has been suggested to use par(xpd=TRUE), increase the margin at the last
plot, and then draw the legend. However, when I do this, the last plot gets
smaller with the same amount I increase the margin with.
The problem seems to
2010 Apr 22
2
legend problem
Dear R users,
I have been plotting several graphics in only one page. I intend to plot
only one legend in each page.
Since the graphics are inside a loop I have to do it automatically.
The main problem is that inside the loop I work with differente types of
variables, I mean , the range is different for each one.
I have already tried :
par(xpd=TRUE)
pos<-par("usr")
2017 Dec 13
0
difference between ifelse and if...else?
ifelse is vectorized.
On Wed, Dec 13, 2017 at 7:31 AM, Jinsong Zhao <jszhao at yeah.net> wrote:
> Hi there,
>
> I don't know why the following codes are return different results.
>
> > ifelse(3 > 2, 1:3, length(1:3))
> [1] 1
> > if (3 > 2) 1:3 else length(1:3)
> [1] 1 2 3
>
> Any hints?
>
> Best,
> Jinsong
>
>
2001 Aug 27
1
colorbar legend for image()
Hi,
are there any plans to add a colorbar legend to image()?
Or such a possibility already implemented which I just haven't
discovered yet. Anyway, I will be willing to spent some time on the
implementation if there isn't anyone working on that already.
Thanks
Thomas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read
2018 May 21
3
strange behavior of plotmath
hi there,
I find the following codes produce strange output.
plot(1:10, xlab = expression(NO[3]^-~(mg/L)))
you will notice that the unit, mg/L is in superscript format.
That means that "~" is not for space.
However, the help page of plotmath does not mention this behavior.
Best,
Jinsong
[[alternative HTML version deleted]]
2023 Mar 31
1
single character in R, and how to manipulate it
Also see the "arctext" function in the plotrix package.
Jim
On Fri, Mar 31, 2023 at 11:12?AM Jim Lemon <drjimlemon at gmail.com> wrote:
>
> Hi Jinsong,
> Maybe "srt" will do what you want. As you noted non-orthogonal
> rotations may not work on some devices. You may be able to download
> mirror fonts from places like fontmirror.com, but it more
2011 Dec 11
2
multiple comparison of interaction of ANCOVA
Hi there,
The following data is obtained from a long-term experiments.
> mydata <- read.table(textConnection("
+ y year Trt
+ 9.37 1993 A
+ 8.21 1995 A
+ 8.11 1999 A
+ 7.22 2007 A
+ 7.81 2010 A
+ 10.85 1993 B
+ 12.83 1995 B
+ 13.21 1999 B
+ 13.70 2007 B
+ 15.15 2010 B
+ 5.69 1993 C
+ 5.76 1995 C
+ 6.39 1999
2008 Sep 15
4
How to draw a plot like this?
Hi there,
I hope to draw a plot like this:
http://www.sg-chem.net/swizard/Ru-bqdi-spectra.gif
is it possible to draw it using R?
thanks for any suggestions.
regards,
Jinsong