6a7
> #import "CurveView.h"
36a38,39
>     xt = yt = NULL;
>     xcurve = ycurve = NULL;
46a50,55
>     [xposTextField setFloatingPointFormat:YES left:3 right:2];
>     [yposTextField setFloatingPointFormat:YES left:3 right:2];
>     [maxZplotField setFloatingPointFormat:YES left:3 right:2];
>     [minZplotField setFloatingPointFormat:YES left:3 right:2];
>     [maxZdataField setFloatingPointFormat:YES left:3 right:2];
>     [minZdataField setFloatingPointFormat:YES left:3 right:2];
47a57
> 
48a59,60
>     [contourView setDelegate:self];		// set ContourView's delegete to myself
>     [contourView enableContinuousNotify:YES];
56a69,103
> - actionPrintCrossHair:sender
> {
>     if([sender state])
>         [contourView enablePrintCrossHair:YES];
>     else
>         [contourView enablePrintCrossHair:NO];
>     return self;
> }
> 
> - markerDidMove:(int)viewtag :(int)marker :(float)x :(float)y :(int)mup
> {
> //int i;
>     if(marker == 0) {
>         [yposTextField setFloatValue: y];	// Y coord of Horiz line
> 
> 	[contourView horizCrossSectionAtY:y :nxInterp forXs:xt :xcurve];
> //	for(i=0; i<nxInterp; i++)
> //	    fprintf(stderr, "(x, y) = (%7.2f, %7.2f)\n", xt[i], xcurve[i]);
> 	[horizCSView setNewTrace: xcurve];
> 	[horizCSView drawIt:self];
>     }
>     else if(marker == 1) {
> 	[xposTextField setFloatValue: x];	// X coord of Vertical line
> 
> 	[contourView vertCrossSectionAtX:x :nyInterp forYs:yt :ycurve];
> 	[vertCSView setNewTrace: ycurve];
> 	[vertCSView drawIt:self];
>     }
> //    fprintf(stderr, "markerDidMove: -- tag=%d, marker=%d,  x=%g, y=%g, mouseup=%d\n",
> //		viewtag, marker, x, y, mup);
>     return self;
> }
> 
> 
> 
137a185
> float xstep = 0.0, ystep = 0.0;
282a331
> 	[self loadPlotRangeFromData:self];
286a336,337
> 	else
> 	    [self getMinMaxZplot];
294a346,387
> 
>         [horizCSView freeTraceCache];
> 	[horizCSView allocTraceCache: 1 : nxInterp];
> 	[horizCSView setScaleX: xmin : xmax];
> 	[horizCSView setScaleY: min_zval - (max_zval - min_zval)*0.1
> 			      : max_zval + (max_zval - min_zval)*0.1];
> 	xstep = (xmax - xmin)/(nxInterp-1);
> 	if(xt) free(xt);
> 	if(xcurve) free(xcurve);
> 	xt = (float *) malloc(sizeof(float)*nxInterp);
> 	xcurve = (float *) malloc(sizeof(float)*nxInterp);
> 	for(i=0; i<nxInterp; i++) {
> 	    xt[i] = xmin + xstep * i;
> 	    xcurve[i] = 0.0;
> 	}
> 	[horizCSView setXvalues: xt];
> 	[horizCSView setDataPoints: NULL : NULL : 0];
> 	[horizCSView cacheDataPointsAndBackGround];
> 	[horizCSView setCurveGray: 0.0];
> 	[horizCSView setNewTrace: xcurve];
> 
> 
>         [vertCSView freeTraceCache];
> 	[vertCSView allocTraceCache: 1 : nyInterp];
> 	[vertCSView setScaleX: ymin : ymax];
> 	[vertCSView setScaleY: min_zval - (max_zval - min_zval)*0.1
> 			      : max_zval + (max_zval - min_zval)*0.1];
> 	ystep = (ymax - ymin)/(nyInterp-1);
> 	if(yt) free(yt);
> 	if(ycurve) free(ycurve);
> 	yt = (float *) malloc(sizeof(float)*nyInterp);
> 	ycurve = (float *) malloc(sizeof(float)*nyInterp);
> 	for(i=0; i<nyInterp; i++) {
> 	    yt[i] = ymin + ystep * i;
> 	    ycurve[i] = 0.0;
> 	}
> 	[vertCSView setXvalues: yt];
> 	[vertCSView setDataPoints: NULL : NULL : 0];
> 	[vertCSView cacheDataPointsAndBackGround];
> 	[vertCSView setCurveGray: 0.0];
> 	[vertCSView setNewTrace: ycurve];
> 
312c405
<     sptr = NXGetDefaultValue(APPNAME, "SaveDir");
---
>     sptr = (char *)NXGetDefaultValue(APPNAME, "SaveDir");
351a445
> 	[contourView updateImageCache];
352a447,453
> 	[horizCSView setScaleY: min_zval - (max_zval - min_zval)*0.1
> 			      : max_zval + (max_zval - min_zval)*0.1];
> 	[vertCSView setScaleY: min_zval - (max_zval - min_zval)*0.1
> 			      : max_zval + (max_zval - min_zval)*0.1];
> 	[horizCSView drawIt:self];
> 	[vertCSView drawIt:self];
> 
437a539
>     [contourView updateImageCache];
448a551
>     [contourView updateImageCache];
464c567,568
<     if([tickSwitch state] || [gridSwitch state])
---
>     if([tickSwitch state] || [gridSwitch state]) {
>         [contourView updateImageCache];
465a570
>     }
482a588
>      [contourView updateImageCache];
495a602
>     [contourView updateImageCache];
509a617
>     [contourView updateImageCache];
518a627
>     	[contourView updateImageCache];
528a638
>     [contourView updateImageCache];
538a649
>     [contourView updateImageCache];
549a661
>     [contourView updateImageCache];
558a671
>     	[contourView updateImageCache];
570a684
>     [contourView updateImageCache];
580a695
>     	[contourView updateImageCache];
