View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Read (digitize) Contour Plot

Be the first to rate this file! 26 Downloads (last 30 days) File Size: 2.92 KB File ID: #38510 Version: 1.1
image thumbnail

Read (digitize) Contour Plot



05 Oct 2012 (Updated )

Load and display a printed contour plot, then use user input to trace the contour lines.

| Watch this File

File Information

This function allows you to re-create the data in Matlab used to create a contour plot.

An image of a printed contour plot is loaded, and displayed in a figure. The user is then prompted to trace the contour lines and click repeatedly along their length to draw them out. The function then converts this into a 2D matrix of data which can be used to re-create the contour plot.

The points clicked are displayed and plotted interactively, and mistakes can be corrected (right clicking deletes the last point).

The function was developed for reading in engine BSFC maps, which are often provided in printed form without the data used to create them. But it could be used for any other data provided in this way.

An example contour plot is included (engine bsfc map from Wikipedia), along with a version correctly cropped for use with this function. An example of how to use the function is given in the help text.

The file is pretty rough (it's my first submission here) but it does the job well. Suggestions or improvements welcome.

[Note that if you're using an older version of Matlab, you will need to replace the tilde on line 114 with a variable name, which remains unused. The tilde syntax was introduced in R2009b.]

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
21 Jun 2016 Paul

Paul (view profile)

Hi - This script is a great idea, but I'm having difficulty getting it to work.

When I finish plotting the contours it exports a matrix full of zeros.

Comment only
23 Jan 2016 E R SH RAJ Male

I am having error

Comment only
04 Oct 2013 1.1

Updated description with note about incompatibility with older Matlab versions

Contact us