| Date | File | Comment by | Comment | Rating |
|---|---|---|---|---|
| 22 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Haesevoets, Yvonne | ...and how do you preserve the line style in tiff files e.g.? Thanks again! |
|
| 22 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Haesevoets, Yvonne | Absolutely awesome!! If only I had found this sooner!! Thanks for sharing!
|
|
| 20 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Bob | Oliver, thanks very much but something is funny. If I have the property editor open for the original figure the color is white. I run the set commands and the color is none. I then use export_fig and the color goes back to white (as seen in the Property Manager), and the figure has a white background (export_fig foo.png -pdf; OS X 10.6.2, 2009b). Same white background on the pdf and the png. |
|
| 20 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Woodford, Oliver | Bob:
|
|
| 20 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Bob | Wish I had found this great script sooner! Can someone tell me how to set the color property to 'none'. If you set edit figure and then use the property editor you only get an option for color (e.g. a palette), you can't type in 'none'. I'm missing something obvious here, can someone please help me with this. |
|
| 20 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Bob | ||
| 18 Nov 2009 | real2rgb & colormaps Converts intensity matrices into truecolor images. | Woodford, Oliver | Richard: This issue is do do with the way MATLAB deals with the colormap, rather than the colormap itself, which is as it should be. MATLAB can only handle 256 level colormaps for indexed images (on Windows). Pcolor avoids the problem. So does using truecolor (rather than indexed) images. You can use real2rgb to generate a truecolor image from your 1024 level colormap and your indexed image. |
|
| 18 Nov 2009 | real2rgb & colormaps Converts intensity matrices into truecolor images. | Richard | Hi Oliver. I don't understand what happens when a colour map with more than 256 elements is requested. I'm trying to create a jet colour map with 1024 elements to display a 10 bit image using the image function. If I do this using either your version of jet or the Matlab one, I get the same result - all blue! 512 creates blue and green strips. 300 elements gives the normal jet colour map between 0 and 255, then it looks like it starts over again from blue. This is not what I would expect - values lower than 256 correctly fit the full colour range into the number of colour map entries requested - I don't see why this should be any different for larger colour maps. The work around I'm using is to use pcolor instead of image to plot the data, as this seems to work with a smaller (presumably 256 element) colour map and map the data onto this. While this works, I don't like the pcolor function very much. It's not intended for displaying images. The axes labels align with grid lines instead of pixels, the data cursor selects points instead of pixels, and I need to have an extra row and column of data. Is there a way of getting a 1024 element colour map that behaves as would be expected? Thanks!
|
|
| 16 Nov 2009 | print_pdf Save figures to high quality pdfs with cropped borders and embedded fonts. | Stefan | Today the answer of TMW's support team arrived.
It it not sure if or when this will change. Thank you Oliver anyway! I now use Matlab for formatting the figure and the page size. Subsequently I print pdfs using an external pdf printer. |
|
| 13 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Willis, Keely | My graphics driver was out of date. Since I updated the driver, everything work perfectly. Thanks! |
|
| 12 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Woodford, Oliver | A reminder for everyone: As I say in the description, please do email me (use the "Contact Author link on my author page) when you have a problem, rather than place it here. I'll respond quicker, and also people finding the function won't think it never works! |
|
| 12 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Willis, Keely | I'm having trouble printing to png format, the figures come out completely black. I'm using MATLAB version 2008b. The command I'm using is "export_fig filename -png". Thanks for any advice. |
|
| 12 Nov 2009 | SC - powerful image rendering Useful tool for rendering and outputting information rich images | Ange | ||
| 11 Nov 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Richards, Clark | Great script. It's driven me nuts for a long time that outputting to pdf in Matlab is a headache. It would be useful if there was an 'append' option for the pdf output. I don't always want to append to the end of a file, often I just want to update a figure and have it overwrite whatever was already there. |
|
| 10 Nov 2009 | print_pdf Save figures to high quality pdfs with cropped borders and embedded fonts. | Woodford, Oliver | Stefan: For some reason the eps file generated by MATLAB's print function doesn't name the fonts correctly. I suggest you contact TMW's technical support. If and when print generates an eps file correctly but print_pdf/export_fig doesn't then generate the correct pdf, then I will investigate further. |
|
| 10 Nov 2009 | print_pdf Save figures to high quality pdfs with cropped borders and embedded fonts. | Stefan | Hi Oliver, thanks for your reply.
I tried your first suggestion, but nothing changed. I now use the options options = [options '-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile="' dest '" -sFONTPATH="C:/Windows/Fonts"']; Obviously gs doesn't know the fonts except for the standard ones. I also tried to set the path: c:\> SET GS_LIB=c:\windows\fonts And I tried to add fonts to gs/fonts/fontmap (using FontMap v1.7), e.g. the line /Coronet (C:/WINDOWS/FONTS/coronet.ttf) ; But all I can see in the pdf file is this Courier font. Any other ideas? Did anyone successfully export other fonts to pdf? Stefan |
|
| 08 Nov 2009 | print_pdf Save figures to high quality pdfs with cropped borders and embedded fonts. | Woodford, Oliver | Stefan: Two things might help. Firstly, you need to make Ghostscript knows about the fonts you want to include. You can tell it where to look by using the -sFONTPATH="C:\blah\blah" option (obviously using the right path). Secondly, you need to make sure the fonts are in a format that Ghostscript understands. For example, I don't think it understands the OpenType format. |
|
| 06 Nov 2009 | print_pdf Save figures to high quality pdfs with cropped borders and embedded fonts. | Stefan | Hi, not each font is exported correctly on my system. Ex:
The font is not 'Arial Black' in this example, although beeing correctly displayed in Matlab. I'm using winXP, Matlab 7.8.0 (R2009a), Ghostscript 8.70, Adobe Reader 9.2.0. I tried some other fonts, only 'Arial' seems to work properly. Is this behavior reproducible on your systems or is a solution available? Thanks for your help!
|
|
| 28 Oct 2009 | real2rgb & colormaps Converts intensity matrices into truecolor images. | Malte | Very handy, worked right away, helped me to superimpose transparent color map on grayscale image. Thanks! |
|
| 26 Oct 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Woodford, Oliver | Michael: MATLAB's print often does funny things to a plot, such as changing the number of tick marks, when you export it, and I don't know how to avoid it. Export_fig uses print, and therefore unfortunately suffers from the same problem. |
|
| 20 Oct 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Kitz, Michael | I wanted to use this tool to save a jpg with the borders cropped. Now I realized that the axes settings were changed during export.
|
|
| 16 Oct 2009 | fullpath Generates a full path from a partial or relative path | Woodford, Oliver | Thanks Julian. To be correct, I should say that every directory except the bottom level file or directory must exist. I.e. only the bottom level directory is allowed to be non-existant. |
|
| 16 Oct 2009 | fullpath Generates a full path from a partial or relative path | Julian | You say that the directory need not exist but I found this not to be the case when using CD myself a while ago to do much the same thing (but less concise than your nice function). Is this correct? |
|
| 27 Sep 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Montorsi, Francesco | ||
| 22 Sep 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Woodford, Oliver | m g: The figure you wish to export must be open. You cannot specify it by the filename. The filename is that of the output file, not the input file. Erica: The filename should be a string. Just like any other MATLAB function, you can call export_fig using parentheses around the input arguments, or not, in which case the inputs are interpreted as strings; i.e. if one of the inputs is not a string then you must use parentheses. The outputs are not the same as those used by print. Type
|
|
| 18 Sep 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Alston, Erica | Hi What is the calling sequence for using this function? should the filename be in parentheses? are the output formats the same as used by matlap e.g. -depsc? Many thanks! |
|
| 14 Sep 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | g, m | I am unable to use export_fig on my linux machine
please help.
|
|
| 12 Aug 2009 | SC - powerful image rendering Useful tool for rendering and outputting information rich images | Woodford, Oliver | Justin - if you prefer the image displaying properties of imagesc I suggest you use image(sc(X)). However, you then don't get the correct colorbar. If it's just the aspect ratio you don't like then call set(gca, 'DataAspectRatioMode', 'auto') after sc. |
|
| 12 Aug 2009 | SC - powerful image rendering Useful tool for rendering and outputting information rich images | Justin | The autopreservation of aspect ratio (mentioned by http://www.mathworks.com/matlabcentral/fileexchange/authors/27420) is the only thing I don't like about sc If I have a very long narrow matrix, imagesc scales it to display it in a standard sized matlab window. sc on the other hand gives me an extremely long narrow window. If there's an easy way to disable this please let me know. Otherwise it's great. |
|
| 31 Jul 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Annette | I'm trying to use this function with Matlab r2007b on a Mac (OS 10.5), and I get the error: ??? Error using ==> rdivide
Error in ==> export_fig at 143
Any insight? Cheers! |
|
| 27 Jul 2009 | imdisp Display multiple images as a montage of subplots | Bulatov, Yaroslav | One gotcha is that one image in the grid can be rendered differently depending on other images in the array (related to scaling of intensity values perhaps?) |
|
| 22 Jul 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Mar, Jason | Great function! It saves me a lot of time, thanks!
|
|
| 20 Jul 2009 | print_pdf Save figures to high quality pdfs with cropped borders and embedded fonts. | Matthijs | ||
| 14 Jul 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | cartonn | how do you export the image with a greater value of dpi?
|
|
| 09 Jul 2009 | vol3d v2 3-d volume (voxel) rendering | Van den Bulcke, Jan | Wonderful! |
|
| 08 Jul 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Sebastiaan | ||
| 07 Jul 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Korsawe, Johannes | Really nice.
If i create a plot and a colorbar, the colorbar will not be printed in the result. Is it possible to enable for a search for colorbars? I tried to adopt your code but failed in copying the correct stuctures. To say it with Stefan: Can you fix/enable that? |
|
| 03 Jul 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Schreiber, Gabriel Akira | ||
| 02 Jul 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Schreiber, Gabriel Akira | ||
| 29 Jun 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Fan, Daisy | Nice! How can I get a high resolution eps, e.g., >300dpi? Matlab's documentation says to use the -r option, e.g.,
|
|
| 03 Jun 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Stefan | Great job! But still one bug: Exporting does not work if axes is child of uipanel. Seems to be some problem when using cobyobj
|
|
| 28 May 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | feng, wei | Great work! You sir saved me a LOT of time. I've been using your print_eps function for a while and found this today. However, I have a problem with converting images to eps format that has been bugging me. For example, I have two images in a matlab figure. On both images I have used the "plot" function to plot some lines on the images. The plotted lines are gray in color. When I export them into eps format, the lines on the first image would remain gray. But the lines on the second image would change to black. The same thing happens when I have more than two images with plotted lines, in which case all the plotted lines except in the first image will turn black. I was wondering if you can shed some light on this? Thanks a lot. |
|
| 28 May 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Guevara Codina, Edgar | Great job!
|
|
| 06 May 2009 | fix_lines Improves the style of lines in MATLAB generated eps files | gmart | i fixed the dashed line in my eps figure after running this function... |
|
| 30 Apr 2009 | SC - powerful image rendering Useful tool for rendering and outputting information rich images | wan, Jun | veri nice .bue i didn't try it |
|
| 29 Apr 2009 | real2rgb & colormaps Converts intensity matrices into truecolor images. | Stanley | ||
| 25 Apr 2009 | print_pdf Save figures to high quality pdfs with cropped borders and embedded fonts. | Woodford, Oliver | David Meller: remove the last two input arguments ('start', 'end') from regexp on line 128. Please email me (use the contact author link on my author page) if you get any more errors. |
|
| 23 Apr 2009 | print_pdf Save figures to high quality pdfs with cropped borders and embedded fonts. | Meller, David | Not compatible with R13 (6.5.0). Gives the following error in the file 'print_pdf.m' on line 128: ??? Error using ==> regexp
Any ideas? |
|
| 21 Apr 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Dorion, Christian | Great piece of work, thanks. A minor thing though... Under my installation, the private/ghostscript.m function had a minor bug that resulted in the whole function being whipped out and replaced by solely the 'gs' path. Just in case it happens to anyone else, here is a simple patch: --- MY/private/ghostscript.m
|
|
| 19 Apr 2009 | export_fig Exports figures nicely to a number of vector & bitmap formats. | Woodford, Oliver | Dan: Currently the only way to change the exported figure size is to change the Matlab figure size before exporting. To get round this, set the paper size options manually within export_fig. Matt C: Thanks for the great suggestion. Shameem/Mohammed: I wanted to keep the interface simple, so unfortunately there is no formal way to control file size. Jpeg file size can be changed by varying the quality setting within export_fig. For more options regarding quality/compression, see savefig (also on the FEX). |
|
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.
Contact us at files@mathworks.com