DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

export to word

 
Post new topic   Reply to topic    DPlot Forum Index -> Excel
View previous topic :: View next topic  
Author Message
jm



Joined: 05 Feb 2004
Posts: 2
Location: Munich, Germany

PostPosted: Wed Jul 19, 2006 1:30 am    Post subject: export to word Reply with quote

How can I improve the quality of contour plots which I copy with CTRL+C and paste to word?
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2289
Location: Vicksburg, Mississippi

PostPosted: Wed Jul 19, 2006 6:42 am    Post subject: Reply with quote

1) Use Options>Extents/Intervals/Size and check the "Specify size" box so that the plot will have the same appearance in DPlot that it does in the pasted image.

2) In Word, use Paste Special rather than Paste, and select "Enhanced metafile" for the format.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Sun Dec 30, 2007 11:53 pm    Post subject: Improving graph export to word Reply with quote

I've found that following DPlotAdmin's recommendation works well with a couple of modifications.

1) When using Options>Extents/Intervals/Size to "Specify size" for the box, make sure you take into account that this is only referring to the size of the graph box -- NOT including the axes titles. So if you want your graph to be 2.5" by 5" in word, specify your box size to be slightly less (e.g. 2.2" by 4.5")

2) Rather than using paste special and the enhanced metafile in word, save your file as an image such as a bmp and then insert this image into word. Using the enhanced metafile changes the size of your datapoints, axes, etc. An export to a picture does not. However, when saving and then importing a picture, following 1) as mentioned above is even more important for maintaining quality.
Back to top
View user's profile Send private message
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Mon Oct 06, 2008 5:48 pm    Post subject: Reply with quote

When we use the specified plot size, this looks fine on a screen, but when you print and look at it, or simply zoom in on it, the numbers of the axis look pretty bad, presumably since it's 75 dpi.

But if I use "Save as" and choose a high dpi, what comes out is completely messed up and useless.

So far the best solution I've found is to set my font size to 20, make specified size twice as big (e.g. 6" x 4" if I really want 3" x 2") and then to shrink the bmp in my word document.

But there has to be a better way!
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2289
Location: Vicksburg, Mississippi

PostPosted: Mon Oct 06, 2008 8:03 pm    Post subject: Reply with quote

Quote:
When we use the specified plot size, this looks fine on a screen, but when you print and look at it, or simply zoom in on it, the numbers of the axis look pretty bad, presumably since it's 75 dpi.


It isn't clear to me whether you're talking about viewing the graph within DPlot or Word. If viewing a pasted bitmap within Word then you might see some aliasing since the image is a fixed number of pixels. For example the following graph uses a 6"x6" size in DPlot before copy/pasting as a bitmap in Word:

http://www.dplot.com/forumimages/ex01.pdf

and I do see some pixelation in the fonts in that image.

But a metafile... well, if there are any imperfections here I guess I'm too blind to see them:

http://www.dplot.com/forumimages/ex01_emf.pdf

Quote:
But if I use "Save as" and choose a high dpi, what comes out is completely messed up and useless.


Again, I'm not sure if you're talking about DPlot or Word. If you use "Save As" for a bitmap image in DPlot with a high resolution and "Specify Size" has been selected, then you'll get a very large image (which may not be what you want) but the proportions will be identical to what you see on the screen.

If you're talking about saving the graph in Word, what are you "saving as"?
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Fri Oct 17, 2008 11:24 am    Post subject: Reply with quote

I tried again and my results have not been consistent, I'm e-mailing you the files to support@dplot.com
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2289
Location: Vicksburg, Mississippi

PostPosted: Fri Oct 17, 2008 2:27 pm    Post subject: Reply with quote

Thanks for the files.

For your file1.grf, right now I'm not entirely sure what is going on there, though I have a few clues. For enhanced metafiles DPlot uses different pens for drawing the symbol borders than it does for standard metafiles. In general those pens look better than the pens used in WMF files if the symbol type has sharp corners (squares, for example - which of course your circles don't have). Those pens aren't used for standard metafiles only because the format doesn't support them. This is the only difference I can think of off the top of my head between enhanced and standard metafiles with regard to your plot. If you use Paste Special in Word and select "Picture (Windows Metafile)" rather than "Picture (Enhanced Metafile)" then I think you'll see that the symbol sizes are much closer to what you see on your display. I'll be taking a close look at this problem as soon as possible.

For your file2.grf:
Quote:
Pasting as emf makes the circles look a bit funny by expanding width (maybe not preventable?)


They look fine to me, though ugly at the default 100% scaling in Word. If you use a larger scale (or print out that page) I think you'll see they look fine. Here they look like perfect circles.

You did find a couple of ugly bugs with saving bitmaps, though. First, the gray background is a bug in the color quantization routine used by DPlot when reducing from 24- or 32-bit to 8-bit. I've never really understood why this only happens occasionally, but will look into it. If when saving the picture, on the "Image Properties" dialog you check the "Improved color quantization" box, you'll get the expected white background. I haven't thrown out the default quantization method in favor of "improved" because the default method is considerably faster, and in my previous experience is only occasionally a problem. But I need to rethink that or try to do something to force the background to be the correct color.

The way-oversized symbols were a puzzle at first, but this turns out to be a simple goof in DPlot that you can easily work around for now. The symbol sizes on your curves 9-16 are set to 0, which at drawing time becomes 1/40 of the plot height. When you use a non-zero resolution DPlot scales everything up proportionately, but it botches up symbol heights of 0. If you use a physical size - say 0.1" - for those symbols then you'll get the expected results.

Thanks for pointing out all of these problems.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2289
Location: Vicksburg, Mississippi

PostPosted: Fri Oct 17, 2008 2:32 pm    Post subject: Reply with quote

PS: The legend getting clipped in a bitmap of your file2 is also related to using a non-zero resolution. Will fix that as well.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2289
Location: Vicksburg, Mississippi

PostPosted: Sat Nov 01, 2008 12:35 pm    Post subject: Reply with quote

Most of the problems you pointed out are fixed in version 2.2.1.7. You should have received an update notice last night; if not you can get the update with Check for Updates on the Help menu.

Fixed problems:
Symbols with size set to 0 were drawn much too large if you saved a plot to a bitmap image with resolution greater than 100 dpi.

Legend might have been clipped if it was located outside the extents of the plot (again, when saving to bitmaps and resolution > 100).

Color quantization didn't work well with large images when saving as an 8-bit image. I've stared at the "quick" quantization method until my eyes are hopelessly crossed, and I can't figure out why it sometimes fouls up the background color, and in some cases other colors. In all of my tests this only happens for large images... so the fallback position used in 2.2.1.7 is to force the use of the slower but better color quantization routine for large images.

But... since you seem to be mostly concerned with image quality in Word, you'll be better off saving as 24-bit anyway. That's especially true if there's any possibility that the image will be resized in Word.

One thing that hasn't been fixed is the apparent discrepancy in symbol size between the display and metafiles. After taking a good long look at this I've concluded that the difference is due to rounding the size to the nearest device unit - pixels on your display, 1/2540'th inch in metafiles. On my display, your circle symbols are 7 pixels tall. A 1 pixel roundoff (actually 2 pixels since in the case of circles it is the radius that is rounded) would make a large apparent difference.

Also, solid symbols are outlined using the line width of the curve, which is another source of roundoff error. I don't think there's a good solution for this one with small plots like your examples.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Wed Aug 18, 2010 10:50 am    Post subject: Reply with quote

Do you know why the legend sometimes moves, depending on how we export it? Or rather... can you fix it? Sometimes I find that copying the picture from dplot and then pasting it to paint works best, and sometimes I find that exporting it works best.

Sometimes when I see what happens, I move my legend slightly and then export again to get it in the correct spot. It'd be nice if we could specify to fix the legend to the corner of the plot and have it stay there..
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2289
Location: Vicksburg, Mississippi

PostPosted: Wed Aug 18, 2010 11:02 am    Post subject: Reply with quote

You're talking about metafiles rather than bitmaps, right? (With bitmaps this shouldn't happen - the legend should be in the same location).

The problem with metafiles here is that drawing objects like lines and the box around the legend can be scaled to any size, but fonts cannot. If any scaling is done in Word (or any other application) then you may not get the exact same appearance as you had in DPlot.

If you want to fix the position of the legend near a corner of the plot, use the "Anchor Point" settings to set the alignment point to the corner of the legend closest to the corner of the plot that you want. For example if you're placing the legend in the upper right corner, select Right and Top.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Wed Aug 18, 2010 11:57 am    Post subject: Reply with quote

Sometimes it happens with export to bmp, and sometimes it does not. I will email you the examples.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2289
Location: Vicksburg, Mississippi

PostPosted: Wed Aug 18, 2010 12:43 pm    Post subject: Reply with quote

Thanks for the files. The legend is actually placed in the correct location. The default anchor point is in the top left corner, and that top left corner is at the same spot in both examples. Your high resolution "bad" image doesn't have the bottom left corner of the legend at the bottom left corner of the plot simply because of font size limitations: the size of the box surrounding the legend is determined by the font sizes, which are only available in discrete sizes rather than being continuous.

The earlier point about legend placement with metafiles applies here, particularly for non-zero resolution values (in which case everything is scaled up). If you want the legend in the lower left corner of the plot, set the anchor point values to Left and Bottom and the X,Y values to 0,1.

The only alternative to doing this and getting what you expect in DPlot would be to specify the locations of all 4 corners, rather than having DPlot figure out the correct size of the box automatically.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2289
Location: Vicksburg, Mississippi

PostPosted: Wed Aug 18, 2010 12:52 pm    Post subject: Reply with quote

Just a clarification for my earlier statement "(With bitmaps this shouldn't happen - the legend should be in the same location)." That's true when the resolution is set to 0, which results in a screenshot. It isn't always true (as you've found out) for higher resolution bitmaps.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ashi



Joined: 30 Dec 2007
Posts: 28

PostPosted: Wed Aug 18, 2010 1:16 pm    Post subject: Reply with quote

Ah! You're right. That is a completely reasonable solution.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Excel All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group