Saturday, April 4, 2009

A better line style method for Matlab plotting


I will be working with a student to create some seamless way to plot a high resolution data set using line markers to distinguish between data sets. Some reasons for why this is not so straightforward now is that if one wants to use Matlab's legend function to distinguish the data sets current methods make it difficult to get the desired effect.

To the right is an example that shows two aspects that we will try to improve upon: the more efficient use of the space in a figure and the use of plotting markers to distinguish lines without using a marker for each data point.

Notice that there is very little whitespace in the figure to the right. (There was still some unused space between the x axis label and the title of the axes below the label. This should be fixed.) This was achieved in a programmatic way. This is essential if one is generating a series of such plots for inclusion in a laboratory report.

Another aspect to observe in the figure is that though each data set has a high resolution each curve has around 5 or 6 plotting markers. This is to distinguish between the lines when one does not need to see where each data point is.

No comments:

Post a Comment