mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
281 stars 185 forks source link

Contourf and contour do not set contour interval. #141

Closed jhiscocks closed 8 years ago

jhiscocks commented 8 years ago

Hello, when plotting pole figures with the following command,

odf = calcODF(ebsd_V10('Magnesium').orientations,'halfwidth',3*degree);
plotPDF (odf, h, 'minmax',  'contour',1:1:4, 'upper') ;

It seems that for the argument 1:1:4 only the first and last number are used, and define the minimum and maximum contour level. The middle value makes no difference and does not affect the number of contours plotted.

I can also plot using the argument 1:4 instead and this sets the maximum and minimum contour.

Is there a way to set the contour interval?

kilir commented 8 years ago

Hi, does plotPDF (odf, h, 'minmax', 'contour','contours',1:1:4, 'upper') ; work for you? I think it's not too clearly documented, but at least for me it works with adding 'contours' before the actual values. All the best, Rüdiger

jhiscocks commented 8 years ago

Thank you for this line of code! One point I notice is that plotting with a start contour of 0 (say 0:2:12) means that the max and min shift slightly with the contours (eg 0:2:12 and 0:4:12 have slightly different maximum/minimum contours). This doesn't seem to happen when the start is not zero (eg 0.5:2:12 and 0.5:4:12 have the same max/min contours). That is a trivial difference though and my issue is now fixed. I greatly appreciate your help.

Jessica