Wayne,
The problem is really with the editors (Illustrator/Inkscape/whatever) &
the way they deal with clipped PS/PDF objects, but given that they're not
going to change any time soon, it would be excellent if you could
implement a solution and this would have the side effect that the files
produced would be smaller.
The use of clipping means that objects that have points outside the
clipping frame get drawn faithfully, which is great but means that it
could be difficult to cull things without unexpected results. Otherwise
you would need to work out the point where every object that crossed the
clipping mask intersects the mask. A reasonable compromise might be at
least to delete all objects whose points all lie outside the mask?
Brian
On Wed, 11 Feb 2009, Wayne Boucher wrote:
> Thanks, that's interesting, and interesting that the PostScript doesn't do
> so badly on this front (since it's doing the same clipping). I'm not
> quite sure what to do about this. I mean I could do the clipping in our
> code but that rather defeats the purpose of a nice language like PS and
> PDF!
>
> Wayne
>
> On Wed, 11 Feb 2009, Patrick van der Wel wrote:
>
>> Wayne,
>>
>> The problem (from what I've seen) is not that it looks bad. Indeed the
>> files include clipping masks that clip off the 'excess' parts of the
>> spectra and the output looks fine as a result.
>>
>> However, if you start to try and edit such a file in an editor like
>> Adobe Illustrator, then all those 'hidden' lines, peaks, etc etc can be
>> come quite annoying since they extend off the page, overlap with other
>> parts of your figure or data, etc. This means that you often have to try
>> to delete them, which makes for more work. Also, when stuff is
>> overlapped like that it can be harder to select the parts that you want.
>> Furthermore, if you (accidentally or on purpose) end up deleting one or
>> more of the clipping masks you can be in real trouble (with stuff
>> suddenly appearing all over the place).
>>
>> All in all, these considerations resulted in me not using the PDF format
>> in such cases and using the postscript instead.
>>
>> Patrick
>>
>> On 2/11/09 2:31 PM, Wayne Boucher wrote:
>>> Hello,
>>>
>>> Does it look ok in another previewer? I don't have Inkscape, I'll try to
>>> download tomorrow at work (the OSX download is 49 Mb, which is going to
>>> push my download capability at home). And can you send me the pdf? I
>>> just tried creating a file with contours that could go off the screen and
>>> the output looked ok in my previewer.
>>>
>>> I should say that the program draws stuff outside of the view window but
>>> it is supposed to be clipped. And the pdf I checked does have clipping
>>> commands in it. (Of course they could be wrong somehow!)
>>>
>>> Wayne
>>>
>>> On Wed, 11 Feb 2009, Mark Pfuhl wrote:
>>>
>>>
>>>> To generate figures of NMR spectra for publication I prefer using
>>>> vectorgraphics (e.g. inkscape). I recently noticed a bizarre thing about a
>>>> spectrum produced by analysis (happens in both 1 and 2): The plot contained
>>>> a small part of the spectrum but when I looked at it in inkscape large
>>>> chunks of the spectrum outside appeared as well (see figure). This means one
>>>> has to remove all the contours outside by hand which is rather tedious. In
>>>> addition, it makes files unnecessarily large. Is there a chance to fix that?
>>>> thanks,
>>>> mark
>>>>
>>>>
>>>>
>>>
>>>
>>
>
Dr. Brian O. Smith ---------------------- B Smith at bio gla ac uk
Division of Molecular & Cellular Biology,
Faculty of Biomedical & Life Sciences,
Joseph Black Building, University of Glasgow, Glasgow G12 8QQ, UK.
Tel: 0141 330 5167/6459/3089 Fax: 0141 330 4600
-------------------------------------------------------------------
The University of Glasgow, charity number SC004401
|