Re: FSC_COLORBAR [message #77409] |
Thu, 01 September 2011 14:28  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bob writes:
> I really like cgColorbar but it needs two small changes
> to really work right. These are to change the default format
> to '' and divisions to 0 (ie, let plot choose). See below
> for a diff. If you try the following with the default
> and modified version it will be clear why these are
> better defaults:
I guess a definition of "work right" depends on what
you do with it. cgColorbar has "worked right" for me
for quite a few years. :-)
Getting a color bar to "work right" is probably why
IDL never provided one. This routine, probably more
than most, allows you to do pretty much everything
that needs to be done. In that sense, it probably
works OK, at the very least.
But, you may be right. I know I chose the default
format of "I0" specifically so that it would be "wrong"
in some instances so that people would have to go
looking for how to make it right. After I did that,
and people discovered that there was actually
documentation in the file(!), my support calls went
way down. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
|
Re: FSC_COLORBAR [message #77415 is a reply to message #77414] |
Wed, 31 August 2011 16:37   |
Jeff[2]
Messages: 18 Registered: November 2007
|
Junior Member |
|
|
On Aug 31, 7:49 pm, David Fanning <n...@dfanning.com> wrote:
> Vito writes:
>> Yes, the command printed out only my Coyote Library!
>
>> I have installed in my PC both IDL versions, 7.0 and 8.0. Could that
>> be a problem?
>
>> I checked my code and everything seems to be right, since it works in
>> version 7.0.
>
>> Another error message I got in IDL 8.0 is "Error in Draw Method.
>> Returning..." :-(
>
> Well, I'm not convinced. What kind of a machine are you
> running this on? :-)
>
> Do you have any astronomy library installed? In particular,
> do you have the SolarSoft library installed?
>
> Is there a particular reason you want to use this
> object color bar anyway? I'll be honest with you,
> I think I've used it twice in my life. I just find
> cgColorbar so much more convenient for nearly everything
> I do that needs a color bar.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
I have a PC intel core i5, it's an usual desktop.
My only library installed in the machine is the Coyote!
I didn't know there was a better routine to draw color bars. I'll try
to use cgColorbar.
Thanks for the tip.
Vito
|
|
|
Re: FSC_COLORBAR [message #77416 is a reply to message #77415] |
Wed, 31 August 2011 15:49   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Vito writes:
> Yes, the command printed out only my Coyote Library!
>
> I have installed in my PC both IDL versions, 7.0 and 8.0. Could that
> be a problem?
>
> I checked my code and everything seems to be right, since it works in
> version 7.0.
>
> Another error message I got in IDL 8.0 is "Error in Draw Method.
> Returning..." :-(
Well, I'm not convinced. What kind of a machine are you
running this on? :-)
Do you have any astronomy library installed? In particular,
do you have the SolarSoft library installed?
Is there a particular reason you want to use this
object color bar anyway? I'll be honest with you,
I think I've used it twice in my life. I just find
cgColorbar so much more convenient for nearly everything
I do that needs a color bar.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: FSC_COLORBAR [message #77417 is a reply to message #77416] |
Wed, 31 August 2011 15:20   |
Vito
Messages: 3 Registered: August 2011
|
Junior Member |
|
|
On Aug 31, 5:40 pm, David Fanning <n...@dfanning.com> wrote:
> Vito writes:
>> I was using colorbar__define.pro routine to draw colobars and it
>> worked fine in IDL 7.0. But now, with the 8.0 version, I'm using
>> fsc_colobar.pro function and it doesn't work. I got the message:
>
>> FSC_Colorbar::Draw Method: Attempt to call undefined method:
>> 'FSC_COLORBAR::POSITION'.
>
>> When I run the same code using fsc_colobar.pro in IDL 7.0 it works!!
>> But in IDL 8.0 the same code is not working.
>
>> Anyone else has had this problem?
>
> No. :-)
>
> I would suspect a Library conflict with some other software.
> What happens when you type this command:
>
> IDL> Print, File_Which('fsc_colorbar__define.pro')
>
> Does that print out the location of your one and only
> Coyote Library? :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Hi David, thanks for answering.
Yes, the command printed out only my Coyote Library!
I have installed in my PC both IDL versions, 7.0 and 8.0. Could that
be a problem?
I checked my code and everything seems to be right, since it works in
version 7.0.
Another error message I got in IDL 8.0 is "Error in Draw Method.
Returning..." :-(
Vito.
|
|
|
|
Re: FSC_COLORBAR [message #77508 is a reply to message #77409] |
Thu, 01 September 2011 14:36  |
Bob[4]
Messages: 24 Registered: April 2009
|
Junior Member |
|
|
OK, perhaps I should have said "work better" :-)
Did you try the example I gave w/ and w/o the changes?
Bob
|
|
|