X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 13 Sep 2013 12:57 AM by  anon
problem witch stretched labels in shade_surf
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
13 Sep 2013 12:57 AM
    Hi out there, it seems that the labels of the z-axis (routine: shade_surf) are stretched to the broadness of the labels of the y-axis (please have a look on the screenshot here: https://www.dropbox.com/s/364uulh5tbw... ). In my case, the z-label "200" is stretched to fit the length of the y-label "5334000". How can I prevend this? Parts of the code: !P.BACKGROUND='000000'x !P.COLOR= 'FFFFFF'x !P.FONT=1 shade_surf, data, charsize=1.5, ax=70, zvalue=0.7 ,$ XTITLE="Rechtswert (Gauss-Krueger) [m]",YTITLE="Hochwert (Gauss-Krueger) [m]",ZTITLE="[m]",$ XSTYLE=3,YSTYLE=3,ZSTYLE=3;, Font="Arial" Thanks a lot, Harald

    Deleted User



    New Member


    Posts:
    New Member


    --
    15 Sep 2013 08:35 AM
    I would try removing the [XYZ]Style keywords. You are setting them to 3, which both extends the axis (whatever that means) and forces exact axis range (1+2=3). I don't think it is possible to do both of those things at the same time. I think that is what is screwing these labels up for you.

    Deleted User



    New Member


    Posts:
    New Member


    --
    15 Sep 2013 10:01 AM
    Thanks a lot for your help. Unfortunately, there is no change in the picture when I omit the [XYZ]STYLE-parameters. The code is: WINDOW, 1, XSIZE=1600, YSIZE=1000, TITLE='Tennenbach' shade_surf, data, charsize=1.5, ax=70, zvalue=0.7 ,$ XTITLE="Rechtswert (Gauss-Krueger) [m]",YTITLE="Hochwert (Gauss-Krueger) [m]",ZTITLE="[m]",$ ZTICKLEN=.02, Font=2 edit: But if I choose another font (FONT=2), then the output of shade_surf looks like this: https://www.dropbox.com/s/m3yu23s2jup... Hmmmm... Harald

    Deleted User



    New Member


    Posts:
    New Member


    --
    16 Sep 2013 09:30 AM
    Well, now this is a misuse of the FONT keyword, which can only have the values -1, 0, and 1. I would suggest setting the FONT=1 and changing your true-type font with DEVICE, SET_FONT='whateveryournewfontis', /TT_FONT=1. It appears from the picture that IDL is chosing hardware fonts (FONT=0) in its confusion, and hardware fonts do not rotate. With surfaces, you need Hershey (FONT=-1) or True-Type (FONT=1) fonts.

    Deleted User



    New Member


    Posts:
    New Member


    --
    17 Sep 2013 03:11 AM
    @David Fanning: Thanks a lot for your hints, nearly everything works fine now. Unfortunately, the "old" problem persists... :-(

    Deleted User



    New Member


    Posts:
    New Member


    --
    17 Sep 2013 07:36 AM
    Well, the shaded surface plot is actually being created as an image in the z-buffer, so this could be a z-buffer problem. The z-buffer has known character size problems. This could be a manifestation of that. Is there any chance you could ditch these direct graphics routines and use object graphics? These routines, my cgSurface, for example, are MUCH better in the 3D world than the 2.5D world of direct graphics. Or, you could try adding your axes after the surface is created. See the Hidden Surface Plot example at the bottom of this page for an example of how that is done. http://www.idlcoyote.com/gallery/index.html
    You are not authorized to post a reply.