Author Topic: Some postscript input appears very faint in Inkscape  (Read 366 times)

March 06, 2019, 12:52:20 PM
Read 366 times

hwang02

  • Jr. Member

  • Offline
  • ***

  • 10
I am a chemist in the field of NMR spectroscopy.  Major NMR instruments are made by Bruker BioSpin.  Their software TopSpin can plot and output postscript files.  When these files are imported into Inkscape, they invariably look very faint, as if there is no width.  Plots are made with the option of "Use thick lines", but this instruction does not seem to be seen by Inkscape or interpreted.  By the contrast, GIMP software as well as Adobe Distiller can process them properly.  Please see the attached files.

The lines are not the only issues with Inkscape.  The files take unusually long time to process and it gives an impression of hanging.  When finally they are imported, the object manipulations (group, ungroup, align, etc) do not seem function properly.

I recently read that these files are plotted in polygons.  I do not know what it means.  I post this message to find out if this kind of postscript files can be handled by Inkscape.   
  • 0.92
  • Windows and Linux

March 06, 2019, 04:29:35 PM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Yes, it looks like this because all the little paths are clipped after import.

Import works fast for me with Inkscape 0.92.4.

To fix the line width, do the following:

- Select the outermost group, do Extensions > Arrange > Deep Ungroup

- Ctrl+click on one part (letter, or line) of the surrounding black axes. This is needed to more easily remove some objects with the same color later. You can change their color back afterwards.
- right-click
- Select same -> Fill + Stroke
- Change the stroke color to anything you like, just not black. It might just be a single digit off-black, unnoticeable.

Now:

- select all (Ctrl+A)
- Object > Clip > Release

Now:

- select the big bar at the bottom
- right-click
- Select same > Fill + Stroke
- Hit del or Backspace

Now the line width is fine.

Now:

- if necessary, fix color of the axes by doing the same 'Select same by color' again fo those pieces.

If you have a lot of time (I didn't wait for it to finish), make the curve more editable and better looking by joining all the little paths together, with:

- Switch to node tool
- do Join nodes (icon on the right of the - icon).

March 06, 2019, 06:20:20 PM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome hwang2, I'm glad you finally got here :)

Also, nice investigative work by Moini!

Mostly this question is over my head.  Plus, I'm not set up to handle EPS files anyway.  But I'm just guessing, since GIMP is a raster graphics editor, and Adobe Distiller appears to be a program for converting EPS to PDF, that they both approach the EPS file from a raster perspective, and that's why they handle it differently from Inkscape.  That's just a guess though.

Is your ultimate goal to produce these plots in a PDF file?  Aside from gimp and adobe handling them more properly (for your purpose), does it matter to you whether you end up with raster or vector files?  If you need vector files in the end, I guess you'd have to work with Inkscape, even though it sounds like it would take significantly more work.  But if raster contents are ok, gimp or adobe might be your best choice.

  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 07, 2019, 08:09:21 AM
Reply #3

hwang02

  • Jr. Member

  • Offline
  • ***

  • 10
Thank you, Moini and brynn.  I tried Moini's method.  In my hands, the spectrum looks fine now, but the axes became a mess.  I need to practice to do it right, I think.  Also, it seems to require a lot of computer resources to get deep ungroup done with even this simple graph.

brynn made a very good point about raster graphics.  I always thought NMR spectra as line drawings, and my previous postscript files have always been vector graphics.  Perhaps this is really raster graphics.  The goal of my using Inkscape is to get at the objects.  For example, I can select objects from several different spectra plots (if I plot them with same dimensions), and align them properly, just keep one axis frame to cover them all, and adjust linewidths if it helps the clarity.  This is useful to compare data from different samples.  To some extent it can be done with the TopSpin software, but the plots have other limitations.  It is not obvious that you can do this with GIMP.  One factor of deterring me using GIMP more is the fact I have not figured out how to do annotation wit it.  Inkscape is much more intuitive to me.

I have worked out a way to mixed use of GIMP and Inkscape.  I think Moini's method of deep ungroup may be useful for me to treat data obtained from another manufacturer's instrument.  Thank you.
  • 0.92
  • Windows and Linux