3D plots look fine in TrueTeX but horrendous in PDF

berntl's picture

I'm using SWP 5.5 under 64 bit Windows 7.

I'm generating some *.png and .eps 3D plots using Matplotlib and Python/NumPy/SciPy. The plots look great on screen in SWP, and they look great in TrueTeX both on screen and when printed. However, they look horrendously ugly in PDF preview and on paper from PDF print.

WHY?

What can I do to fix this?

-B

Graphics files and PDF. The

Graphics files and PDF.

The .eps graphics will have to be converted before they can be included in the PDF file. SW does this automatically with third party graphics filters included. However, sometimes the conversion can give bad results. Using a different graphics format or sometimes even opening and resaving the graphics using some graphics program can create graphics that the conversion filters can handle correctly.

The graphics types .png and .jpg can be handled directly when typesetting for PDF, but graphics can get run through the conversion filters even when they don't need to be. The conversion filters don't do the best job in some cases. Here are steps that should prevent the conversion when it isn't needed.

- In SW, select Typeset, General Settings, and choose the PDF Graphics Settings button.
- In the PDF Graphics Export Options dialog, turn off the check box in front of "Copy unchanged graphics to destination directory" .
- Under Apply Export Options to, if not already selected, choose "Selected graphics" and then choose "Special graphics sets". On the right under "Export Options" select "Leave graphics unchanged".
- Use OK to close the open dialogs.

There is also a registry change needed so SW will use the original graphics rather than generating a new graphics. For Scientific WorkPlace 5.5, the key:

HKEY_CURRENT_USER\Software\MacKichan Software\Scientific Workplace\5.50\GraphicsMisc\GrfxResizeThreshhold

or for Scientific Word 5.5, the key:

HKEY_CURRENT_USER\Software\MacKichan Software\Scientific Word\5.50\GraphicsMisc\GrfxResizeThreshhold

should have it's value changed from the default of 0.075 to 2. You can do this using the regedit program. OBLIGITORY WARNING: Directly making changes to the registry can be dangerous. A change in the wrong part of the registry can cause errors, even to the extent where Windows must be reinstalled. If you don't already know how to use a registry editor program to make the change, you probably shouldn't attempt to make the change.

Alternatively, you can edit the file swp-pro.ins used by Scientific WorkPlace or sciword.ins used by Scientific Word that is read when SW starts using an ASCII editor (for example, NotePad) by adding the lines:

[GraphicsMisc]
GrfxResizeThreshhold=2

and also changing:

MoveToIniDbase=0

to:

MoveToIniDbase=1

under [Installation] near the top of the file. The .ins file is located in the SW install directory (usually c:\swp55 or c:\sw55).

These changes should cause the original graphics to be used when creating the PDF file. If the graphics is being resized, it can still go through the conversion filter, so you might want to recreate the graphics in the correct size using an external graphics program.

I never use the SWP built-in

I never use the SWP built-in pdf since the graphics have always come out crappy. I tried your suggestion above, and I assume the quality has improved, but the images (from png) are still visibly degraded compared to using a pdf printer (I tried a couple) with the dvi file. Too bad it's still not correct...

If you followed the steps,

If you followed the steps, then the .png graphics would be directly included in the resulting PDF file.  You can check that this is happening by using Typeset, Output Choice, selecting PDF Output, and then saving the document.  Inspect the saved .tex file in a text editor and the \includegraphics statement would refer directly to the graphics rather than to a generated graphics.

 

berntl's picture

Thanks a lot! Excellent

Thanks a lot! Excellent answer, as always.

I think I need some personal

I think I need some personal tuition here. I cannot produce a pdf output that produces graphics, despite following all recommendations.

I can only use Microsoft print to pdf from the dvi output and that pdf is a huge 200meg file, and like an image file with no pdf search features. I cannot distribute my thesis and I have tried all the pdf advice.

It always seems to be something in the Linda Gilbert settings that brings me unstuck.

I would appreciate some advice. Regards and thanks Phil

Sorry, but there's no

Sorry, but there's no information in your message to suggest why you are not having success.

You should be able to compile for DVI or PDF and see equivalent results.  Using the normal techniques, I can't guess why graphics are appearing in DVI but not in PDF.  Post a sample document that shows this, along with the graphics you are using (save as .rap to bundle the .tex and graphics into the same file).  You should probably also include the .log file from your PDF compile (save the document before previewing and the .log will be saved in the same directory with the .tex and .pdf files).

Probably best to post a top level message since what you describe so far doesn't match exactly with this thread.