comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Contour labels in IDL 8.0
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Contour labels in IDL 8.0 [message #93558 is a reply to message #72800] Thu, 18 August 2016 07:00 Go to previous messageGo to previous message
Brian McNoldy is currently offline  Brian McNoldy
Messages: 35
Registered: July 2000
Member
This is still confounding me... I cannot get the contour labels to appear upright on a reversed y axis, nor can I get contour labels to appear undistorted on a log axis. And unfortunately, my plots involve BOTH (my y axis is atmospheric pressure), and I can't get anything that is acceptable to use (see example in previous post).

Is this a bug in the CONTOUR function, or am I not doing something correctly? Here is the essence of my code:

c1=contour(array,x,y,/fill,/ylog,c_value=findgen(81)*0.5,$
xrange=[0,500],yrange=[1000,50])
c2=contour(array,x,y,c_value=findgen(21)*5,c_label_show=1,c_ color=0,color='black',/overplot)

Thanks!
Brian


On Tuesday, October 5, 2010 at 11:32:20 AM UTC-4, OUWxGuesser wrote:
> Greetings,
>
> I'm having a heck of a time trying to get my contour labels to look
> reasonable in IDL 8.0.
>
> If I use a y axis that is in reverse (for example plotting atmospheric
> pressure data from 1000 mb (at y=0) up to 100mb (y=36 in this case),
> all of my labels are flipped vertically (not upside-down). I have
> tried to specify the baseline and updir in the contour command in
> combination with setting C_USE_LABEL_ORIENTATION=1, but these fail to
> change the labels. Very frustrating.
>
> Here's a snippet of code:
>
> data=fltarr(12,37) (for reference)
>
> yvals=[1000,850,700,600,500,400,300,200,100]
>
> x=indgen(12)+1
>
> p=1000-25*indgen(37)
>
> image=contour(data,x,p,n_levels=ncol,c_value=clevs,/
> ylog,yrange=[1000,100],xrange=[1,12],$
> ytickv=yvals,xtickv=x,C_USE_LABEL_ORIENTATION=1,C_LABEL_SHOW =[0,1])
>
> (I omitted the baseline/updir keywords... I tried just about every
> combination of 0,1,-s, but nothing seems to impact the labeling.
>
> If any of you can find something inherently wrong with my code OR know
> how to get this to work I would be extremely happy! Other than this
> issue, I've been relatively pleased with the transition to the new
> graphics system.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Efficiently multiplying an array by a vector
Next Topic: get data points of the contoured image

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:49:32 PDT 2025

Total time taken to generate the page: 0.00470 seconds