Hi Adam:

On Thu, Dec 30, 2010 at 2:59 PM, Adam Carr <adamlcarr@yahoo.com> wrote:

> Good Evening:
>
> I am putting together a large report with plots created in R, V 2.12.0.
> Most of
> the plots are created using ggplot2 V0.8.9. I use R's pdf() command to
> export
> the plot to a pdf file. I am exporting the plots and attempting to edit the
> title text in Inkscape primarily because ggplot2 does not support
> superscript or
> subscript formatting in the title text. For the report I am working on
> these
> formats are essential.
>

I have a counterexample to your claim that ggplot2 does not support
superscript or subscript formatting in the title :)

df <- data.frame(u = (1:10)^2, v = exp(seq(0, 4.5, by = 0.5)))
g <- ggplot(df, aes(u, v))
g + geom_point() + opts(title = expression(x[1]^2~~'and'~~e^y))
g + geom_point() + opts(title = expression(x[1]^2~~'and'~~e^y)) +
     xlab(expression(x[1]^2)) + ylab(expression(e^y))

...unless I'm misunderstanding what you mean by 'formatting' subscripts and
superscripts. If so, some elaboration of the problem would be helpful.

HTH,
Dennis

>
> I am running the R version mentioned above and Inkscape 0.48 on a Windows
> XP
> machine with the following system details:
>
> OS Name Microsoft Windows XP Professional
> Version 5.1.2600 Service Pack 3 Build 2600
> System Type X86-based PC
> Processor x86 Family 6 Model 15 Stepping 11 GenuineIntel ~1995 Mhz
> BIOS Version/Date LENOVO 7LETB7WW (2.17 ), 4/25/2008
> Total Physical Memory 4,096.00 MB
> Available Physical Memory 1.62 GB
> Total Virtual Memory 2.00 GB
> Available Virtual Memory 1.96 GB
> Page File Space 8.69 GB
>
> I do not think this is a ggplot2-specific problem.
>
> I use a simple version of the pdf() command to export the file that
> includes the
> file name and path only. The PDF looks fine actually, it is the restriction
> on
> text editing caused by Adobe's intepretation of the graphic that is the
> problem.
>
> I have attached two files to this email:
>
> 1. An R-exported pdf file exactly as it looks as opened in Adobe Reader V9.
> This
> file is named exportforinkscapeforum.pdf.
>
> 2. An example of the way the plot appears after I import it into Inkscape.
> This
> file is named Example of How Imported File Appears in Inkscape.pdf.
>
> The problem I have is that when I import the pdf into Inkscape the solid,
> filled
> circles on the plot are converted to the lower case letter q. I read about
> similar problems on R-help.org and other R-related sites, but the
> descriptions I
> found seemed to indicate that the lower case q was visible in the pdf file
> when
> opened with Adobe or other viewers. This does not seem to be my problem.
>
>
> I posted this problem to the Inkscape forum and received a reply suggesting
> that
> Adobe is interpreting the solid, filled circles not as solid, filled
> circles but
> as font objects. The user who replied suggested that I look for the Zpf
> Dingbat
> font embedded in the PDF and it is in fact there. This is the font Adobe is
> applying to my solid, filled circles. Apparently there are known issues
> with
> Inkscape's ability to import fonts via PDF and the problem is documented on
> their bug list.
>
> The Inkscape user asked if there was any way that R could be coerced to use
> actual circles or paths for the points. I am not aware of a way to do this
> so
> any input from anyone here would be greatly appreciated.
>
> To briefly return to my main problem: if there is another way to edit the
> main
> title text to include a superscripted character (in my particular case it
> is
> Unicode character 00AE, the registered trademark sign) I would appreciate
> the
> insight.
>
>
> Any help on this issue would be appreciated.
>
> Adam
>
>
>
> ______________________________________________
> R-help@r-project.org mailing list
> 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.
>
>

	[[alternative HTML version deleted]]

