begin ; ; Create some dummy data for the contour plot. ; N=25 T = new((/N,N/),float) jspn = ispan(-N/2,N/2,1)^2 ispn = ispan(-N/2,N/2,1)^2 do i = 0, dimsizes(ispn)-1 T(i,:) = ispn(i) + jspn end do T = 100.0 - sqrt(8^2 * T) ; ; Create an X workstation. ; wid = create "wks" xWorkstationClass defaultapp end create ; ; Create a data object. Change the min and max of the Y axes to be ; 10 and 10000 instead of 0 and N-1 (the default), because you can't take ; the log of 0. ; dataid = create "data" scalarFieldClass defaultapp "sfDataArray" : T ; Contour data. "sfYCStartV" : 10 ; Min value for Y axis. "sfYCEndV" : 10000 ; Max value for Y axis. end create ; ; Create a ContourPlot object and draw it to show what a linear X and ; Y axis looks like. ; cnid = create "ContourPlot" contourPlotClass wid "cnScalarFieldData" : dataid "tiXAxisString" : "linear" ; Label for X axis. "tiYAxisString" : "linear" ; Label for Y axis. end create draw(cnid) ; Draw the contour plot. frame(wid) ; Advance the frame. ; ; Now set trYLog to True to indicate the Y axis should be log. ; setvalues cnid "tiYAxisString" : "log" ; Label for Y axis. "trYLog" : True ; Log scaling for Y axis end setvalues draw(cnid) ; Draw the contour plot. frame(wid) ; Advance the frame. end