Bug #1011
RCP: 0.7.6, Label display problem in R graphics, Mac
Status: | Closed | Start date: | 09/12/2014 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | - | % Done: | 100% |
|
Category: | Charts / R port from JFC | Spent time: | - | |
Target version: | TXM 0.7.7 |
Description
Reported by JCD on Mac OS X 10.9.4: R graphics (WordCloud or CAH) labels are "pixelized".
Diagnostic 1 - TXM graphics:- Question: Can we reproduce the bug?
- Test: produce a CAH from TXM with the following configurations:
- Mac OS X 10.6 + Java 6, 0.65 = no bug
- Mac OS X 10.9 + Java 7, 0.60 + xQuartz 2.7.6 = no bug
- Mac OS X 10.9 + Java 7, 0.67 + xQuartz 2.7.6 = no bug
- Mac OS X 10.9 + Java 7, 0.67 + xQuartz 2.7.7 = no bug
- Remark: Mac OS X 10.9 + Java 7, 0.67 - xQuartz = FAILS, no graphic is displayed. This is expected
- Conclusion: Impossible to reproduce the bug (MD + SJ) -> JCD must help us to diagnose the bug.
- Question: Is native R buggy for graphics?
- Test: Run the "bfmprogression.R" script directly from R = no bug
- Conclusion: ask to set graphic device to 'svg'
- Question: Is the SVG file generated corrupted?
- Test: Get the SVG file generated in the "results" directory then check if it opens well in external editor and in TXM Batik SVG Editor
- Conclusion: nope, the glyphs are just wrong
- Question: Is TXM R execution for graphics buggy?
- Test: Run "bfmprogression.R" script from TXM
- Conclusion: yes
- Question: Has TXM 0.7.6 introduced this bug?
- Test: Reinstall TXM 0.7.5 and compute a CAH graphic
- Conclusion:
- see what could go wrong with the 'svg' device of the 'cairo' R package
WIP
- define if the bug is only related to the svg() device (SVG device based on cairo graphics) or to all the devices
- to do that, 2 solutions:
1) plot on png, jpg, native window (Quartz) devices in TXM and see if the bug is present
2) plot on svg device in R outside TXM and see if the bug is present
- NOTE: cairo uses X11 on some OS. On Mac OS X 10.9, svg() uses cairo that needs and uses XQuartz
- define if the bug is linked to a font problem
- define if the bug is linked to SVG antialiasing. I got pretty much same results as JCD when setting 'shape-rendering="optimizeSpeed"' attribute of 'svg' tag in an SVG and reopen it in TXM/Batik editor. Be careful, opening the SVG file, in Safari for example, works well. Need the SVG generated by JCD in 'results' directory to confirm that
- Mac OS X 10.9.4 VM + Java 7 64bit, 0.55 + R version 3.0.1 (2013-05-16) - xQuartz = FAILS to load cairo, as expected
- Mac OS X 10.9.4 VM + Java 7 64bit, 0.55 + R version 3.0.1 (2013-05-16) + xQuartz 2.7.6 = no bug (but two warning messages)
- NOTE: got theses warnings while plotting: "Fontconfig warning: ignoring UTF-8: not a valid region tag
Fontconfig warning: ignoring UTF-8: not a valid region tag"
- NOTE: got theses warnings while plotting: "Fontconfig warning: ignoring UTF-8: not a valid region tag
- Mac OS X 10.9.4 VM + Java 7 64bit, 0.55 + R version 3.0.1 (2013-05-16) + xQuartz 2.7.7 = no bug (but same warning messages as above)
NOTE: to show current XQuartz version:
mdls -name kMDItemVersion /Applications/Utilities/XQuartz.app
NOTE: to show current R version, type 'version' in R console
JCD R version : 3.1.0 with RStudio
Related issues
History
#1 Updated by Matthieu Decorde over 8 years ago
- Description updated (diff)
#2 Updated by Matthieu Decorde over 8 years ago
- Description updated (diff)
#3 Updated by Matthieu Decorde over 8 years ago
- Description updated (diff)
#4 Updated by Matthieu Decorde over 8 years ago
- Description updated (diff)
#5 Updated by Matthieu Decorde over 8 years ago
- Description updated (diff)
#6 Updated by Matthieu Decorde over 8 years ago
- Description updated (diff)
#7 Updated by Serge Heiden over 8 years ago
- Description updated (diff)
#8 Updated by Sebastien Jacquot over 8 years ago
- Priority changed from Normal to High
#9 Updated by Sebastien Jacquot over 8 years ago
- Target version changed from TXM 0.7.6 to TXM 0.7.7
#10 Updated by Sebastien Jacquot about 8 years ago
- Category changed from Stats / R to Charts / R port from JFC
- Target version changed from TXM 0.7.7 to TXM 0.7.8
Actually the first step should be to get the .svg file generated in the "results" then check if it opens well in external editor and in TXM Batik internal editor to see if it's a writing bug or a reading bug.
#11 Updated by Sebastien Jacquot about 8 years ago
I got this error on R 3.0.1 for Mac:
Fontconfig warning: ignoring UTF-8: not a valid region tag
it may be related. (Almost similar issues on R or dev forums talk about a font problem when labels are not displayed on R/Mac in plots.)
#12 Updated by Sebastien Jacquot about 8 years ago
- Description updated (diff)
#13 Updated by Matthieu Decorde about 8 years ago
- Description updated (diff)
#14 Updated by Sebastien Jacquot about 8 years ago
NOTE: TXM uses default parameters of R svg cairo based device. The default parameters are:
svg(filename = if(onefile) "Rplots.svg" else "Rplot%03d.svg", width = 7, height = 7, pointsize = 12, onefile = FALSE, family = "sans", bg = "white", antialias = c("default", "none", "gray", "subpixel"))
This bug may be linked to the family font parameters (therefore related to a system font).
Finally the bug may be not related to the antialiasing parameter since SVG file creation should not use the windowing system or graphics card ? But there is this note Cairo doc that I don't understand well:
In principle these devices are independent of X11 (as is seen by their presence on Windows). But on a Unix-alike the cairo libraries may be distributed as part of the X11 system and hence that (on OS X, XQuartz) may need to be installed.
It seems to mean that even creating a SVG file under Mac OS X uses the windowing system ? So the bug would be strongly linked to quartz, xquartz and/or graphics card drivers.
#15 Updated by Sebastien Jacquot about 8 years ago
- Description updated (diff)
#16 Updated by Sebastien Jacquot about 8 years ago
- Description updated (diff)
#17 Updated by Sebastien Jacquot about 8 years ago
- Description updated (diff)
#18 Updated by Sebastien Jacquot about 8 years ago
- Status changed from New to Resolved
- Target version changed from TXM 0.7.8 to TXM 0.7.7
- % Done changed from 0 to 90
Fixed. There is a font configuration problem in the binary distribution of R 3.1.0 for OS X from CRAN. Upgrading to R 3.1.2 fixes this unreadable labels bug.
(The problem is linked to R svg() device => Cairo)
#19 Updated by Sebastien Jacquot about 8 years ago
- Status changed from Resolved to Closed
- % Done changed from 90 to 100