Rank: 101871 based on 0 downloads (last 30 days) and 0 file submitted
Personal Profile:


Watch this Author's files


Comments and Ratings by Dylan View all
Updated File Comments Rating
09 Jun 2010 boundedline.m Plot one or more lines with a shaded boundary (can represent error, confidence intervals, etc). Author: Kelly Kearney

This is a very useful function that does almost exactly what I was trying to do, and it should save me a lot of time. Thanks for making it!

I think, though, that it would be even more useful if you made two modifications:

1) The reference color of the bounded area should be set independently (as an RGB array), rather than being constrained to be a lighter shade of the corresponding line color. This would be particularly relevant for users preparing b&w figures for publication who, for example, might want to use two black lines and two different shades of grey for the bounded areas. The specific example I provided could of course be facilitated simply by allowing separate transparency parameters for each bounded area, but that still would not provide as much flexibility as some users might want.

2) The default behavior of 'legend' is to use shaded boxes that are the same colors as the bounded areas. Some users might prefer that the legend use lines of the same color and style as the corresponding data. It would be nice to have the option of using either. I believe this could be controlled from within boundedline.m by setting the 'IconDisplayStyle ' property of the 'LegendEntry' array of each patch to 'on' or 'off'.

Example code:

Also, there appears to be a bug (using R2007b): adding a legend to a figure that was made using the 'alpha' option results in no legend and no bounded areas.

22 Mar 2010 PlotEpsTeX eps file exportation with LaTeX text and symbols Author: jean-christophe OLIVIER

legend2latex fixes the legend problem without the need for @...@. See my comment on the legend2latex File Exchange page for info on how to incorporate it into plotepstex.

22 Mar 2010 plot2eps Function to streamline the workflow of converting plots to eps files for inclusion in LaTeX. Author: Mark Verveld

I haven't tested this extensively, but I've come across the following bugs/issues:

The batch file doesn't work with file names that contain spaces.

To fix this, add double quotes around the eps filename on line 272 so that it reads:

fprintf(fid, 'epstopdf.exe "%s.eps"\n', filename{1,index});

Also, I found legend2latex to do a better job of converting the legends than plot2eps. See my comment in the File Exchange page for legend2latex for info on how to get it to work with plot2eps (and plotepstex).

Finally, at line 192 I added


since I often want to include units in my axis labels and siunitx is my preferred package for rendering units with LaTeX.

Already, I can envision wanting other packages or new commands available for use in the axis labels or legends in order to maintain continuity with the rest of my document. I suppose this is why Arno chose to provide the .tex and .eps files separately in his original LaPrint.m, since LaTeX will interpret everything correctly only if you include the figure.tex file in your document.tex file.

For example, I have defined a new command called \conc:


If I want to write \conc{K} in the xlabel of my matlab plot and have LaTeX properly interpret it, then I have to either add that \newcommand call into the plotepstex (or laprint) code so that it is present in every new .tex file that plotepstex (or laprint) makes, or I have to use the \include function in my main latex file and I don't end up with an eps file of the figure in which the properly interpreted labels have replaced the psfrags.

After thinking about it for a minute I haven't come up with a nice clean solution for getting this final eps without having to manually add necessary commands or packages to .tex file that laprint normally generates. Anyone have any ideas?

22 Mar 2010 Legend to latex converter This function converts a Matlab legend to a text annotation for latex interpretation. Author: Emile Demarteau

Works like a charm. For those who want to use this with plotepstex (and plot2eps):

In the plotepstex.m file:

Comment out the legend-handling code at lines 104-125 and lines 154-173.

Then add the following lines at line 147:

if ~isempty(legend)

Contact us