marbl / merqury

k-mer based assembly evaluation
Other
272 stars 19 forks source link

The words on the picture are garbled #41

Closed YiRan0220 closed 3 years ago

YiRan0220 commented 3 years ago

Hi, I have a problem with this output picture. Why is the text above scrambled? I have tried to reanalyze it for many times, but the result is the same.

sincerely, YiRan test athal_CVI cvi0 hapmer spectra-cn st test athal_CVI cvi0 hapmer spectra-cn fl test athal_CVI cvi0 hapmer spectra-cn ln

brianwalenz commented 3 years ago

I've seen this - in other apps - when I don't have the correct font installed, but usually only for the 'fancy' symbols like emoji. Since this is just standard normal letters (the label on the X axis in the bottom picture reads 6B=k 6D=m 65=e 72=r 5f=_ and so on) and I'd have to suspect something is wrong with your R installation.

Here's a couple of links to others with a similar problem, but no solution that I saw: https://stackoverflow.com/questions/59796585/r-plots-corrupted-missing-characters-for-devices-other-than-pdf https://stackoverflow.com/questions/60565754/greek-letters-in-r-expressions-result-in-missing-glyph

YiRan0220 commented 3 years ago

Thanks! Yes, it is my R installation problem. It may be because the R version is too low. I updated R from 3.6.1 to 4.0.3 and solved the problem perfectly. Thank you very much!

YiRan0220 commented 3 years ago

Hello, Another question, can I output images to PDF files, I have not found the relevant command options, thank you

arangrhie commented 3 years ago

Seems like for some OS, the R isn't installed to use the cairo engine by default. I added this to commit ff0f689e72cf76b42972a3e6095acefec07810c2 to explicitly set the plotting engine as cairo.

Rscript $MERQURY/plot/plot_spectra_cn.R --help Will give you other options. Use -p to output in pdf.

Thanks, Arang