Bug #1011

RCP: 0.7.6, Label display problem in R graphics, Mac

Ajouté par Matthieu Decorde il y a environ 11 ans. Mis à jour il y a plus de 10 ans.

Statut:Closed Début:12/09/2014
Priorité:High Echéance:
Assigné à:- % réalisé:

100%

Catégorie:Charts / R port from JFC Temps passé: -
Version cible: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.
Diagnostic 2 - JCD R script graphics:
  • 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'
Diagnostic 3 - JCD TXM SVG graphics:
  • 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
Diagnostic 4 - JCD TXM R script graphics:
  • Question: Is TXM R execution for graphics buggy?
  • Test: Run "bfmprogression.R" script from TXM
  • Conclusion: yes
Diagnostic 5 - is the bug present in TXM 0.7.5:
  • Question: Has TXM 0.7.6 introduced this bug?
  • Test: Reinstall TXM 0.7.5 and compute a CAH graphic
  • Conclusion:
Hypothesis 1
  • 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

NEW TESTS SJ, plotting SVG file from R outside TXM
  • 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"
  • 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


Demandes liées

lié à Support #987: JCD: graphics display since TXM 0.7.6 Closed 02/09/2014

Historique

#1 Mis à jour par Matthieu Decorde il y a environ 11 ans

  • Description mis à jour (diff)

#2 Mis à jour par Matthieu Decorde il y a environ 11 ans

  • Description mis à jour (diff)

#3 Mis à jour par Matthieu Decorde il y a environ 11 ans

  • Description mis à jour (diff)

#4 Mis à jour par Matthieu Decorde il y a environ 11 ans

  • Description mis à jour (diff)

#5 Mis à jour par Matthieu Decorde il y a environ 11 ans

  • Description mis à jour (diff)

#6 Mis à jour par Matthieu Decorde il y a environ 11 ans

  • Description mis à jour (diff)

#7 Mis à jour par Serge Heiden il y a environ 11 ans

  • Description mis à jour (diff)

#8 Mis à jour par Sebastien Jacquot il y a presque 11 ans

  • Priorité changé de Normal à High

#9 Mis à jour par Sebastien Jacquot il y a presque 11 ans

  • Version cible changé de TXM 0.7.6 à TXM 0.7.7

#10 Mis à jour par Sebastien Jacquot il y a presque 11 ans

  • Catégorie changé de Stats / R à Charts / R port from JFC
  • Version cible changé de TXM 0.7.7 à 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 Mis à jour par Sebastien Jacquot il y a presque 11 ans

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 Mis à jour par Sebastien Jacquot il y a presque 11 ans

  • Description mis à jour (diff)

#13 Mis à jour par Matthieu Decorde il y a presque 11 ans

  • Description mis à jour (diff)

#14 Mis à jour par Sebastien Jacquot il y a plus de 10 ans

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 Mis à jour par Sebastien Jacquot il y a plus de 10 ans

  • Description mis à jour (diff)

#16 Mis à jour par Sebastien Jacquot il y a plus de 10 ans

  • Description mis à jour (diff)

#17 Mis à jour par Sebastien Jacquot il y a plus de 10 ans

  • Description mis à jour (diff)

#18 Mis à jour par Sebastien Jacquot il y a plus de 10 ans

  • Statut changé de New à Resolved
  • Version cible changé de TXM 0.7.8 à TXM 0.7.7
  • % réalisé changé de 0 à 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 Mis à jour par Sebastien Jacquot il y a plus de 10 ans

  • Statut changé de Resolved à Closed
  • % réalisé changé de 90 à 100

Formats disponibles : Atom PDF