From ripley at stats.ox.ac.uk  Wed Nov  7 11:05:38 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 7 Nov 2007 10:05:38 +0000 (GMT)
Subject: [Rd] Saving Graphics File as .ps or .pdf (PR#10403)
In-Reply-To: <3c12769c0711070151u18c95d9ch58a08780b4d232c1@mail.gmail.com>
References: <20071106150504.8746A283462E@mail.pubhealth.ku.dk>
	<47308E34.6030901@statistik.uni-dortmund.de>
	<3c12769c0711060813r11cd1848o466af0b2ea72b05f@mail.gmail.com>
	<Pine.LNX.4.64.0711061637370.13662@gannet.stats.ox.ac.uk>
	<3c12769c0711060947o3e7ada11hf5156314f48923bc@mail.gmail.com>
	<4730B02C.5010209@biostat.ku.dk>
	<3c12769c0711070151u18c95d9ch58a08780b4d232c1@mail.gmail.com>
Message-ID: <Pine.LNX.4.64.0711071002300.5485@gannet.stats.ox.ac.uk>

On Wed, 7 Nov 2007, Simone Giannerini wrote:

> [snip]
>> Maybe, but given the way things have been working lately, it might be
>> better to emphasize
>>
>> (a) check the mailinglists
>> (b) try R-patched
>> (c) if in doubt, ask, rather than report as bug
>>
>> (Ideally, people would try the prerelease versions and problems like
>> this would be caught before the actual release, but it seems that they
>> prefer treating x.y.0 as a beta release...)
>>
>
> I am sorry but I do not agree with point (b) for the very simple fact
> that the average Windows user do not know how to compile the source
> code and might not even want to learn how to do it. The point is that
> since (if I am correct) the great majority of  R users go Windows you
> would miss an important part of potential bug reports by requiring
> point (b) whereas (a) and (c) would suffice IMHO.
> Maybe if there were Win binaries of the prerelease version available
> some time before the release you would get much more feedback but I am
> just guessing.

Windows binaries of R-patched are available all the time via
http://cran.r-project.org/bin/windows/base/

They are not always current, but only occasionally are they more than a 
day or two old.

Same for R-devel.

The biggest plus point about recommending trying R-patched is that is 
often the solution to the problem (as here, although there is also a 
workaround).


>
> Regards
>
> Simone
>
>
>
>>
>>>
>>> On 11/6/07, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
>>>
>>>> On Tue, 6 Nov 2007, Simone Giannerini wrote:
>>>>
>>>>
>>>>> I looked at the list of bug fixes before writing and I found that the
>>>>> only thing close to it is this
>>>>>
>>>>> o     postscript() was not always ignoring .Postscript.Options in
>>>>>       the workspace (where it should not have occurred).
>>>>>
>>>>> but I must admit I did not understand whether it had anything to do
>>>>> with this bug report.
>>>>>
>>>> It occurs on Windows only, and the src/gnuwin32/CHANGES file says
>>>>
>>>> BUG FIXES
>>>>
>>>>      o   Saving a plot to Postscript or PDF required the font database
>>>>          to have been initialized: this is now done if necessary.
>>>>
>>>> See also
>>>>
>>>> https://mailman.stat.ethz.ch/pipermail/r-help/2007-October/142414.html
>>>>
>>>> (over a month ago).
>>>>
>>>>
>>>>> Thanks
>>>>>
>>>>> Simone
>>>>>
>>>>> On 11/6/07, Uwe Ligges <ligges at statistik.uni-dortmund.de> wrote:
>>>>>
>>>>>> This has been reported several times before and has been fixed in
>>>>>> R-patched some weeks ago.
>>>>>>
>>>>>> Uwe Ligges
>>>>>>
>>>>>>
>>>>>> Jane_Harvill at Baylor.Edu wrote:
>>>>>>
>>>>>>> Full_Name: Jane L. Harvill
>>>>>>> Version: 2.6.0
>>>>>>> OS: Microsoft Windows XP Professional, Version 2002, Service Pack 2
>>>>>>> Submission from: (NULL) (129.62.21.93)
>>>>>>>
>>>>>>>
>>>>>>> PROBLEM: The ability to save the contents of an R Graphics window as a
>>>>>>> postscript or PDf file through the drop-down menu (File -> Save As ->
>>>>>>> Postscript, or File -> Save As -> PDF) results in the error message below being
>>>>>>> printed to the R Console.
>>>>>>>
>>>>>>> ERROR MESSAGE:
>>>>>>> -----------------------------------------------------------------
>>>>>>> Error: Invalid font type
>>>>>>> In addition: Warning messages:
>>>>>>> 1: font family not found in PostScript font database
>>>>>>> 2: font family not found in PostScript font database
>>>>>>> -----------------------------------------------------------------
>>>>>>>
>>>>>>> TO RECREATE THE PROBLEM:
>>>>>>> 1.  Using the R Console, create some graph in R; for example, plot(rnorm(100)).
>>>>>>> 2.  Select File -> Save As -> PostScript  (or File -> Save As -> PDF).
>>>>>>> 3.  Supply a file name and click the "Save" button.
>>>>>>>
>>>>>>> FOUR OTHER RELEVANT NOTES:
>>>>>>> 1.  I checked to see if the same error results when invoking the functions
>>>>>>> pdf(file=...) or postscript(file=...).   No error results, and the content of
>>>>>>> the output (.ps or .pdf) file produces a duplicate of what appears in the R
>>>>>>> Graphics window.
>>>>>>>
>>>>>>> 2.  I checked, but did not see any other bug reports in the system that are
>>>>>>> relevant to this problem.
>>>>>>>
>>>>>>> 3.  Before I submitted this R Bug Report, I reinstalled the PostScript fonts,
>>>>>>> and then reinstalled R Version 2.6.0.  This did not change the outcome.
>>>>>>>
>>>>>>> 4.  This problem did not exist in previous versions of R on any of my computers.
>>>>>>>  It exists on all computers for version 2.6.0 of R.
>>>>>>>
>>>>>>> ______________________________________________
>>>>>>> R-devel at r-project.org mailing list
>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>>>>>
>>>>>> ______________________________________________
>>>>>> R-devel at r-project.org mailing list
>>>>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>> --
>>>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>>>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>>>> University of Oxford,             Tel:  +44 1865 272861 (self)
>>>> 1 South Parks Road,                     +44 1865 272866 (PA)
>>>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>>    O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
>>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
>>  (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
>> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907
>>
>>
>>
>
>
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Saving Graphics File as .ps or .pdf (PR#10403)
Prof Brian Ripley