

To illustrate the point, we save the image as EPS, convert it to PNG, and then show it here. Print( 'improvedExample', '-dpng', '-r300') Īn interesting feature of MATLAB is that the rendering in EPS is not the same as in PNG. % Here we preserve the size of the image when we save it. To do this, we have so specify the correct position on the paper. The size needs to be preserved in the saved (i.e., printed) version.Therefore, it’s best to manually specify the tick marks so that they are correctly preserved in both display and saving. These can change again when the figure is saved. Depending on the size of figure, MATLAB may or may not choose tick marks to your liking.Now that you’ve created this fantastic figure, you want to save it to file. Step 3: Save the figure to a file and view the final results Plot(dmn,f(dmn), 'b-',dmn, g(dmn), 'r-',xeq,f(xeq), 'g*', 'LineWidth',lw, 'MarkerSize',msz) %<- Specify plot properites Set(gca, 'FontSize', fsz, 'LineWidth', alw) %<- Set properties The font size for the legend, axes lables, and title are inherited from the settings for the current axes.

For plotting the results, manually specify the line width and marker sizes as part of the plot command itself. For the current axes, set the default fontsize and axes linewidth (different from the plot linewidth). These commands assume 100 dpi for the sake of on-screen viewing, but this does not impact the resolution of the saved image. Msz = 8 % MarkerSize Step 2: Creating a figure with manually modified propertiesĬreate a new figure. It’s a good idea to test the final version in its final place (e.g., as a figure in a LaTeX report or an image in a PowerPoint presentation) to make sure the sizes are acceptable.

#Graph matlab 2014a trial#
Typically, some trial and error is needed to find values that work well for a particular scenario. In the table below, we give some suggested values for papers and presentations. There are a few parameters that can be used to modify a figure so that it prints or displays well. Step 1: Choose parameters (line width, font size, picture size, etc.) The image renders as shown below and is not easy to read. This example has been adapted from YAGTOM ( ), an excellent MATLAB resource. Department of Energy’s National Nuclear Security Administration under contract DE-AC04-94AL85000. (*) Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation, for the U.S.
