Displaying 20 results from an estimated 100 matches similar to: "R fails when converting units using Hershey-Fonts"
2009 Sep 24
1
unexpected behavior of `[<-` method for class unit.arithmetic
Dear list,
Consider the following,
library(grid)
w = unit.c(unit(1, "in"), unit(2, "in"))
w2 = w + unit(1, "mm")
w[2] <- 0
w2[2] <- 0
convertUnit(w, "mm")
#[1] 25.4mm 0mm
convertUnit(w2, "mm")
#Error in grid.Call("L_convert", x, as.integer(whatfrom),
as.integer(whatto), :
# INTEGER() can only be applied to a
2011 Apr 26
2
grid stringHeight
Dear all,
I'm puzzled by the behavior of stringHeight in the grid package.
Consider the following test,
library(grid)
test <- function(lab="dog", ...){
g1 <- textGrob(lab)
g2 <- rectGrob(height=grobHeight(g1), width=grobWidth(g1))
gg <- gTree(children=gList(g1,g2), ...)
print(c("height:", convertUnit(stringHeight(lab), "mm",
2004 Apr 09
1
R-1.9.0 beta: vignettes for package grid
Since release of R-1.9.0 is very close, let me mention that there seems
to be a problem when building vignettes for package grid (see below),
e.g. yesterday's R-1.9.0 beta on Windows NT 4.0.
Uwe Ligges
====================================================
building/updating vignettes for package 'grid' ...
Warning messages:
1: 'viewport.transform' is deprecated.
Use
2008 Nov 19
1
Buggy trellis.focus() with xyplot ?
Hi:
(Tried to find a bug report about this issue, but was unable to find it, let
me know if this is a known issue)
I have been working on an interface to highlight xyplot panels on mouse
overs in JavaGD but I have stumbled with what seems to be a bug in
trellis.focus.
I am using R 2.8 with lattice 0.17-15
*** To replicate the bug:
1.- display an xyplot. For example, from the xyplot help page:
2008 Nov 19
0
Buggy trellis.focus() with xyplot in JavaGD ?
Hi:
(Tried to find a bug report about this issue, but was unable to find it, let
me know if this is a known issue)
I have been working on an interface to highlight xyplot panels on mouse
overs in JavaGD but I have stumbled with what seems to be a bug in
trellis.focus.
I am using JGR R 2.8 with lattice 0.17-15
Note: It's important to you use JGR to use the Java Graphics Device.
*** To
2009 Mar 21
1
Forestplot () box size question
Hi All,
I have been able to modify the x-axis to start at zero by adding xlow
and xhigh parameters; that was pretty simple. I have been unable to
find the location of the code that would turn off the information
weighting of the box size (I have smaller randomized trials getting
less weight than a much larger non-randomized trial). The function
is forestplot() from rmeta.
Thanks for any
2011 Mar 04
2
Creating a .png with just an expression() in it
Hey,
I'm trying to create an image file with the results of a regression
analysis. In TeX, the line would be something like:
$ size = 0.34 + 4.3 var_1 $
Can I create a plot window with just this line in it? I tried playing
around with plot.new() or dev.new(), but didn't really find something
that worked.
Thanks in advance,
Alex
--
alexx at alexx-fett:~$ vi .emacs
2005 Jul 26
1
problem with Hershey fonts
This was reported to me by a colleague in China, so I may not be
reproducing exactly what they are seeing (which I suspect is rw2011), but
this is what I see:
> version
_
platform i386--netbsdelf
arch i386
os netbsdelf
system i386, netbsdelf
status
major 2
minor 1.1
year 2005
month 06
day 20
language R
> help(Hershey)
:
:
If the 'vfont' argument
2008 Oct 17
1
Using key.opts in Ecdf/labcurve (Hmisc package)
I'm presumably missing something very obvious, but how does one use the
key.opts argument in labcurve (via Ecdf)?
In this example, I want the key to be big and have a blue background, but
it isn't and doesn't.
ch <- rnorm(1000, 200, 40)
sex <- factor(sample(c('female','male'), 1000, TRUE))
Ecdf(~ch, group=sex, label.curves=list(keys=c("f",
2017 Jun 21
1
encoding/locale problem with ssh -X
Hi all,
I am struggling with remote R sessions and a (I suspect) locale related
encoding problem: Using the X11 device (X11forwarding enabled),
whenever I try to plot something containing umlauts using ggplot2, I am
seeing sth like
,----
| Error in grid.Call(L_stringMetric, as.graphicsAnnot(x$label)) :
| invalid use of -61 < 0 in 'X11_MetricInfo'
`----
Using base graphics is fine
2009 Jun 26
1
gradient fill of a grid.polygon
Dear list,
Following a recent enquiry, I've been playing with the idea of creating a
colour gradient for a polygon, using the Grid package. The idea is to draw a
number of stripes of different colours, using the grid.clip function. Below
is my current attempt at this,
library(grid)
rotate.polygon <- function(g, angle=0){ # utility function, works fine
matR <- matrix(c(cos(angle),
2005 Jun 22
1
legend
I color some area grey with polygon() (with a red border) and then I
want to have the dashed red border in the legend as well. How do I
manage it?
And I want to mix (latex) expressions with text in my legend.
Just execute my lines below and you know want I mean. Or pass by at
http://de.wikipedia.org/wiki/Bild:GBM.png to see the picture online.
Thomas
bm <- function(n=500, from=0, to=1) {
2005 Jun 02
0
Thanks! (was panel.axis() & grid/lattice settings)
Deepayan, Paul:
Thanks very much for the very useful leads. I just spent some time this
afternoon implementing your suggestions and my early test results are very
encouraging.
Paul, I understand the potential device re-sizing issue with the convert
family of functions in grid, and will be in touch in case it becomes
problematic for my applications. I very much look forward to your upcoming
2009 Sep 19
1
matrix operations on grobs and grid units
Dear list,
As a minimal test of a more complex grid layout, I'm trying to find a
clean and efficient way to arrange text grobs in a rectangular layout.
The labels may be expressions, or text with a fontsize different of
the default, which means that the cell sizes should probably be
calculated using grobWidth() and grobHeight() as opposed to simpler
stringWidth() and stringHeight().
2008 Jan 22
1
Hershey Felder, The Secrets About Musical Instruments And Physics
Hershey Felder, The Secrets About Musical Instruments And Physics
Every sound produced by a musical instrument has a physical explication, the
way instruments are created and the type of materials that are used define
in a unique way the resulting sound. The sound wave is a transfer of energy
that doesn't imply matter. Within a more theoretical approach sounds are
Mechanical Longitudinal
2005 May 24
1
How to get special (Hershey) font symbols into plot axis labels? [Revisited]
Dear R users,
I would like to use sub- and super-script in axis labels. I assume this
is best done using Hershey symbols. When trying to find information on
using Hershey font symbols in axis labels, I came across the following
discussion thread:
http://maths.newcastle.edu.au/~rking/R/help/02a/1857.html
Have Hershey font implementations moved on since then?
Thanks,
Sander.
--
2010 Jan 15
1
What is the newline escape sequence when using the Hershey fontfamily?
Hello!
The question is simple: What is the escape sequence for a new line when
using Hershey fonts? I obviously tried '\n' but it didn't work (see the
sample below). I looked at 'demo(Hershey)' but all it only shows escape
sequences for printable characters.
The sample I've been using to try to find the escape sequence is below.
You can comment or un-comment the
2010 Dec 19
1
Hershey fonts and substitute()
Hello R users,
I am new to R, so this may be a very stupid question. I need to
subscript the dotted circle (Hershey escape sequence "\\SO") to a
string. I tried using
text(.5,.5,substitute( R[disk] == 5 R["\\SO"] ) )
but it turns out to be a syntax error.
Do you have any suggestion?
Thanks
Gaetano
2007 Jan 03
2
Hershey fonts for musical notation?
Hi,
I'd like to know if it is possible to use Hershey vector fonts to create very primitive musical notation.
If I can hang some whole notes on these lines
X11()
plot(0,0, xlim=c(0,10), ylim=c(0,10))
# Staves:
for (i in c(seq(from=2,to=2.8,by=0.2),seq(from=4,to=4.8,by=0.2)))
{
abline(h=i)
}
it is enough.
Best wishes,
Atte Tenkanen
University of Turku, Finland
2000 Oct 04
1
Hershey Fonts, PNG, SVG, .. graphics formats
I wonder if we couldn't just use the PNG , SVG, support from the
GNU plotutils
from which we already have the Hershey scalable vector fonts [-> help(Hershey)]
The new plotutils (July 2000) do support these (and will probably even
better in the future, i.e., we can build on others people free software.
Paul [who built "Hershey" into R], do you think this path is worth pursuing?