label contours

13 views
Skip to first unread message

Shahid Maqbool

unread,
Oct 31, 2022, 2:13:59 AM10/31/22
to dislin-users
Dear all,

I have the output matrix whose plot looks like (matlab plot).

mceclip3_1612586462.png
Now i want to get the plot in my Fortran Code. It seems like shaded
contour with contour labels. 

I am following the instructions in  Dislin and  Dislin. Somehow i do
not figure out the Zlev. How to adjust it if this is the reason of not 
getting the desired output?

Best regards,
Shahid

Helmut Michels

unread,
Oct 31, 2022, 11:01:22 AM10/31/22
to dislin-users
Dear Shadid,

for getting a similar result as in your Matlab plot, you have to call 'conshd' for
plotting the shaded areas between contour lines and 'contur' for drawing the
labeled contour lines. conshd expects an array of contour levels, while contur must
be called for each single value in the level array. For example:

          real zlvray(n), xray(nx), yray(ny), zmat(nx,ny)
          ...
          call conshd  (xray, nx, yray, ny, zmat,  zlvray, n)
          call labels ('FLOAT', 'CONTUR')
          do i=1,n
              call contur (xray, nx, yray, ny, zmat, zlvray(i))
           end do
           ...

With best regards,

Helmut

Shahid Maqbool

unread,
Nov 1, 2022, 8:43:56 AM11/1/22
to dislin-users
Dear Helmut,

thanks. It is working now.

Best regards
Shahid

Reply all
Reply to author
Forward
0 new messages