On 2020-08-18 11:02 +1200, Paul Murrell wrote:
| On 18/08/20 9:54 am, Bert Gunter wrote:
| | On Mon, Aug 17, 2020 at 2:14 PM <cpolw...@chemo.org.uk> wrote:
| | | 
| | | Plotmath seems to be the right way 
| | | to do it.  But without reading 
| | | plotmath I'd have gone with this:
| | | 
| | | plot(y, main=paste("data", "\u03C3=", s))
| | 
| | "Plotmath seems to be the right way 
| | to do it."
| | 
| | Not sure I agree with that. Paul 
| | Murrell put together plotmath around 
| | 2000 prior to the widescale 
| | development and adoption of the 
| | unicode standard 
| | (corrections/modifications 
| | welcome!).  So at the time, there 
| | really was no other way to handle 
| | this for most OS'es. With UTF8 now 
| | being generally supported for 
| | Unicode, plotmath constructions may 
| | not be needed for simple symbol 
| | labeling, as here. Of course for 
| | more complex symbolism (fractions, 
| | integrals, ...) it will be. 
| | ?plotmath talks about this and has 
| | links to further issues and options, 
| | btw.
| | 
| | In other words, unicode may indeed 
| | be better than my suggestion of 
| | plotmath here.
| 
| I think that comment is fair *on 
| graphics devices that can handle 
| unicode*.
| 
| So that is true for Cairo-based 
| graphics devices, but not for the 
| pdf() or postscript() devices, for 
| example.

Eventhough I'm a heavy user of pdf(), I 
didn't notice at first that the sigma 
gets converted to two dots with the 
error messages

        Warning messages:
        1: In title(...) :
          conversion failure on 'data σ= 1' in 'mbcsToSbcs': dot substituted 
for <cf>
        2: In title(...) :
          conversion failure on 'data σ= 1' in 'mbcsToSbcs': dot substituted 
for <83>
        3: In title(...) :
          conversion failure on 'data σ= 1' in 'mbcsToSbcs': dot substituted 
for <cf>
        4: In title(...) :
          conversion failure on 'data σ= 1' in 'mbcsToSbcs': dot substituted 
for <83>

like if it was a Han character (most 
likely three dots in that case), I just 
ran with cpolwart's suggestion in 
whatever is the default on the R 
console, probably that Cairo thing.  
png() works ofc. 

V

r

Attachment: signature.asc
Description: PGP signature

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to