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

Home » Public Forums » archive » Adding Legends to Coyote Graphics Windows
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Adding Legends to Coyote Graphics Windows [message #86840] Fri, 06 December 2013 12:52 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I have nothing against the NASA routine AL_Legend for adding legends to
graphics displays. I've used it for years, and so has nearly everyone I
know. But, I've been feeling guilty about not having a "native" Coyote
Graphics solution, and I have long wanted something a bit simpler to
understand and use. A new program, cgLegend, may fit the bill. It
doesn't have as many features as AL_Legend, but it does have the "fit
and finish" of a Coyote Library program, which I like. You can find
documentation here:

http://www.idlcoyote.com/idldoc/cg/cglegend.html

And you can find examples of using cgLegend in this updated web page:

http://www.idlcoyote.com/cg_tips/al_legend.php

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #86858 is a reply to message #86840] Mon, 09 December 2013 02:15 Go to previous messageGo to next message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Hello,

How to control the size of the text & symbols in the legend box?

Thanks in advance.

On Friday, December 6, 2013 9:52:26 PM UTC+1, David Fanning wrote:
> Folks,
>
>
>
> I have nothing against the NASA routine AL_Legend for adding legends to
>
> graphics displays. I've used it for years, and so has nearly everyone I
>
> know. But, I've been feeling guilty about not having a "native" Coyote
>
> Graphics solution, and I have long wanted something a bit simpler to
>
> understand and use. A new program, cgLegend, may fit the bill. It
>
> doesn't have as many features as AL_Legend, but it does have the "fit
>
> and finish" of a Coyote Library program, which I like. You can find
>
> documentation here:
>
>
>
> http://www.idlcoyote.com/idldoc/cg/cglegend.html
>
>
>
> And you can find examples of using cgLegend in this updated web page:
>
>
>
> http://www.idlcoyote.com/cg_tips/al_legend.php
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #86859 is a reply to message #86840] Mon, 09 December 2013 02:43 Go to previous messageGo to next message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den fredagen den 6:e december 2013 kl. 21:52:26 UTC+1 skrev David Fanning:
>
> http://www.idlcoyote.com/idldoc/cg/cglegend.html

Does this page exist?

When I try it I get to a page saying "I Can't Find the Page You Are Looking For..." and telling me to contact your technical support contractors. I did, and they directed me to an amusing but not entirely useful movie: http://www.youtube.com/watch?v=tTmK1pu4ZjU
Re: Adding Legends to Coyote Graphics Windows [message #86860 is a reply to message #86859] Mon, 09 December 2013 05:22 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mats Löfdahl writes:

>
> Den fredagen den 6:e december 2013 kl. 21:52:26 UTC+1 skrev David Fanning:
>>
>> http://www.idlcoyote.com/idldoc/cg/cglegend.html
>
> Does this page exist?

Yikes! It does now. Sorry about that.


> When I try it I get to a page saying "I Can't Find the Page You Are Looking For..." and telling me to contact your technical support contractors. I did, and they directed me to an amusing but not entirely useful movie: http://www.youtube.com/watch?v=tTmK1pu4ZjU

Funny. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #86861 is a reply to message #86858] Mon, 09 December 2013 05:28 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Madhavan Bomidi writes:

> How to control the size of the text & symbols in the legend box?

There is always a good chance Coyote is hung over when I ask him to do a
very simple thing like update the documentation on the web page. If he
screws it up, like he did here, you can always open any Coyote Graphics
routine and find the documentation at the very top of the file. It's
built in, as it is on most IDL programs you find on the Internet. In
this case, the keywords you are looking for are Charsize and Symsize.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #86863 is a reply to message #86860] Mon, 09 December 2013 05:43 Go to previous messageGo to next message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den måndagen den 9:e december 2013 kl. 14:22:05 UTC+1 skrev David Fanning:
> Mats Löfdahl writes:
>
>
>
>>
>
>> Den fredagen den 6:e december 2013 kl. 21:52:26 UTC+1 skrev David Fanning:
>
>>> http://www.idlcoyote.com/idldoc/cg/cglegend.html
>
>> Does this page exist?
>
> Yikes! It does now. Sorry about that.

Thanks!

I have found that with al_legend, I almost always use the top/bottom and left/right keywords for placement. Any chance you will implement them in cglegend?

Specifying the coordinates of the upper left hand corner of the legend box seems tricky if you want the legend to go in any other corner of the plot than upper left, given that you may want to add or remove items of various lengths. Or is there a smart way if thinking about this that I just don't see?

>> When I try it I get to a page saying "I Can't Find the Page You Are Looking For..." and telling me to contact your technical support contractors. I did, and they directed me to an amusing but not entirely useful movie: http://www.youtube.com/watch?v=tTmK1pu4ZjU
>
> Funny. :-)

:o)
Re: Adding Legends to Coyote Graphics Windows [message #86864 is a reply to message #86863] Mon, 09 December 2013 06:07 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mats Löfdahl writes:

> I have found that with al_legend, I almost always use the top/bottom and left/right keywords for placement. Any chance you will implement them in cglegend?

Yes, there is a "chance" I will do something like this. I usually wait
for people to ask for more complicated things, but I usually wait more
than two minutes. ;-)

> Specifying the coordinates of the upper left hand corner of the legend box seems tricky if you want the legend to go in any other corner of the plot than upper left, given that you may want to add or remove items of various lengths. Or is there a smart way if thinking about this that I just don't see?

Here is the problem. It is impossible to know what size the legend is
going to be until it is drawn. AL_Legend and cgLegend both solve the
problem in the same way: they draw the legend twice, the second time
overwriting the first. I had hoped to be able to do this a different
way, and I wrote code to do so, but I haven't been able to make it work
correctly in the PostScript device yet.

Of course, as I am writing this I am thinking of another way it might be
implemented. So, yes, there is a "chance". But, why would you choose
cgLegend over AL_Legend if they both did the same thing?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #86868 is a reply to message #86864] Mon, 09 December 2013 07:10 Go to previous messageGo to next message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den måndagen den 9:e december 2013 kl. 15:07:58 UTC+1 skrev David Fanning:
> Mats Löfdahl writes:
>
>> I have found that with al_legend, I almost always use the top/bottom and left/right keywords for placement. Any chance you will implement them in cglegend?
>
> Yes, there is a "chance" I will do something like this. I usually wait
> for people to ask for more complicated things, but I usually wait more
> than two minutes. ;-)

Not complicated enough? OK, what about automatically figuring out where there is empty space in the plot and put the legend there? :o)

>> Specifying the coordinates of the upper left hand corner of the legend box seems tricky if you want the legend to go in any other corner of the plot than upper left, given that you may want to add or remove items of various lengths. Or is there a smart way if thinking about this that I just don't see?
>
> Here is the problem. It is impossible to know what size the legend is
> going to be until it is drawn. AL_Legend and cgLegend both solve the
> problem in the same way: they draw the legend twice, the second time
> overwriting the first. I had hoped to be able to do this a different
> way, and I wrote code to do so, but I haven't been able to make it work
> correctly in the PostScript device yet.

I realize that something like that has to go on behind the scene. What I meant was that I didn't know of a smart way to figure this out as a user.

> Of course, as I am writing this I am thinking of another way it might be
> implemented. So, yes, there is a "chance". But, why would you choose
> cgLegend over AL_Legend if they both did the same thing?

They are solving the same problem, so there's bound to be some overlap. The placement keywords are overlap that I would like to see but that doesn't mean I don't think you will make cgLegend smarter than AL_Legend in many other respects.
Re: Adding Legends to Coyote Graphics Windows [message #86878 is a reply to message #86863] Mon, 09 December 2013 14:10 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mats Löfdahl writes:

> I have found that with al_legend, I almost always use the top/bottom and left/right keywords for placement. Any chance you will implement them in cglegend?

I have added functionality to cgLegend that will make this slightly more
flexible than AL_Legend, I think. Here is how it works.

There is an ALIGNMENT keyword that can be used to change the meaning of
the LOCATION keyword. (The LOCATION keyword is called POSITION in
AL_Legend, but I use POSITION to mean a particular four-element array in
Coyote Graphics, so I changed this keyword name.) Basically, with the
ALIGNMENT keyword you can specify whether the LOCATION is any of the
four corners of the legend "box", or the middle of any of the four sides
of the legend "box". You have eight choices.

This allows you to put the legend anywhere you like in the plot window
(including outside the plot, if you want to). You can center the legend
box both horizontally and vertically. Or, you can left, right, top, and
bottom align it. You simply specify a point location, and tell me, with
the ALIGNMENT keyword, what part of the box should be aligned with that
point.

You will need two files:

http://www.idlcoyote.com/programs/cglegend.pro
http://www.idlcoyote.com/programs/cglegenditem.pro

You can find documentation on the program and on the ALIGNMENT keyword
here:

http://www.idlcoyote.com/idldoc/cg/cglegend.html

Hours spent updating cgLegend for better legend positioning: 8 hours.

Income from newsgroup requested activities for December: $60.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #86880 is a reply to message #86878] Mon, 09 December 2013 14:22 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> This allows you to put the legend anywhere you like in the plot window
> (including outside the plot, if you want to). You can center the legend
> box both horizontally and vertically. Or, you can left, right, top, and
> bottom align it. You simply specify a point location, and tell me, with
> the ALIGNMENT keyword, what part of the box should be aligned with that
> point.

Oh, I also fixed it so that I only have to draw things on the plot once.
More or less. I had to use some smoke and mirrors to do this, but it
works pretty good, I think. In PostScript I just write off the page
where you can't see it. :-)

This also works in cgWindows in the usual way.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #86884 is a reply to message #86880] Tue, 10 December 2013 02:19 Go to previous messageGo to next message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Thanks for your effort and update.

On Monday, December 9, 2013 11:22:19 PM UTC+1, David Fanning wrote:
> David Fanning writes:
>
>
>
>> This allows you to put the legend anywhere you like in the plot window
>
>> (including outside the plot, if you want to). You can center the legend
>
>> box both horizontally and vertically. Or, you can left, right, top, and
>
>> bottom align it. You simply specify a point location, and tell me, with
>
>> the ALIGNMENT keyword, what part of the box should be aligned with that
>
>> point.
>
>
>
> Oh, I also fixed it so that I only have to draw things on the plot once.
>
> More or less. I had to use some smoke and mirrors to do this, but it
>
> works pretty good, I think. In PostScript I just write off the page
>
> where you can't see it. :-)
>
>
>
> This also works in cgWindows in the usual way.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #87536 is a reply to message #86880] Fri, 14 February 2014 07:09 Go to previous messageGo to next message
elisadelgadomena is currently offline  elisadelgadomena
Messages: 6
Registered: February 2014
Junior Member
Hello David
First of all, thank for all your effort, it's being very helpful for me.
I wanted to do a plot with a colorbar, legend and several data sets and I was searching in your available examples to do that.
Finally I got it and it's perfect but I have a small problem. When saving it in a ps or eps the first appearance is correct (open with gv for example) but when I include it in a latex to produce a ps or pdf the titles of the legend are appearing in their normal place but also in the upper left part of the plot, ones over the others, but outside, getting mixed with other plots or text that appear in the pdf.
Have this happened to you? Since I'm a newbie in coyote libraries maybe I'm doing something wrong but I cannot find the error. I have something like this:

set_plot,'ps'
device,filename='plot.eps',/color,/encapsulated

cgPlot, mass6,log_Li6, /NoData, XTitle='Mass', YTitle='log Li',xrange=[0.7,1.75],yrange=[-0.8,3.5]
cgplotS,mass6,log_Li6,psym=8,color=age6_colors
cgplotS,mass7,log_Li7,psym=symcat(17),color=age7_colors
cgplotS,mass8,log_Li8,psym=symcat(18),color=age8_colors
cgColorbar, /Vertical, Position=[0.9, 0.1, 0.95, 0.9], Bottom=1, NColors=255, $
Minor=0, YTicklen=1, Range=[0,12], $
/Right, Title='Age (Gyr)', Format='(I2)',/fit
cglegend,titles=['planets harps','comparison harps','planets others'],psyms=[8,6,17],/box,length=0,location=[0.7,0.28],ch arsize=1.2

device,/close
set_plot,'x'

I changed the order of the legend (before the first cgplotS) and also I added the keyword alignment to the legend, but nothing changed...
I also tried to change from eps to ps but again obtained the same result :(

thanks
Re: Adding Legends to Coyote Graphics Windows [message #87537 is a reply to message #87536] Fri, 14 February 2014 07:36 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elisadelgadomena@gmail.com writes:

> First of all, thank for all your effort, it's being very helpful for me.
> I wanted to do a plot with a colorbar, legend and several data sets and I was searching in your available examples to do that.
> Finally I got it and it's perfect but I have a small problem. When saving it in a ps or eps the first appearance is correct (open with gv for example) but when I include it in a latex to produce a ps or pdf the titles of the legend are appearing in their normal place but also in the upper left part of the plot, ones over the others, but outside, getting mixed with other plots or text that appear in the pdf.
> Have this happened to you?

No, it has never happened to me, but it is not totally surprising to me,
either. :-)

The problem with a legend is that to create one and draw a box around
it, or to add a background color, or to place it somewhere in the
graphics window, you have to know how big it is. In particular, you have
to know the length of your text strings. Unfortunately, with direct
graphics, the only way to discover the length of your text string is to
draw it somewhere. In other words, you can only find out *after* the
fact.

So, there are a lot of smoke and mirror tricks that have be used. One of
my tricks is to use a pixmap to do the drawing. That works for graphics
windows, but not for PostScript files. In PostScript files, I tend to
draw the text off the page and in the background color, hoping no one
will notice. Obviously, I haven't been totally successful. :-(

I honestly don't know how to solve this problem. I'm not sure the
problem *can* be solved. I'll look into it. But I don't have great
expectations for success. Sorry.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #87538 is a reply to message #87537] Fri, 14 February 2014 07:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>
> elisadelgadomena@gmail.com writes:
>
>> First of all, thank for all your effort, it's being very helpful for me.
>> I wanted to do a plot with a colorbar, legend and several data sets and I was searching in your available examples to do that.
>> Finally I got it and it's perfect but I have a small problem. When saving it in a ps or eps the first appearance is correct (open with gv for example) but when I include it in a latex to produce a ps or pdf the titles of the legend are appearing in their normal place but also in the upper left part of the plot, ones over the others, but outside, getting mixed with other plots or text that appear in the pdf.
>> Have this happened to you?
>
> No, it has never happened to me, but it is not totally surprising to me,
> either. :-)

I'm not sure I can duplicate the problem. I created a plot with a legend
as a PostScript file and I opened it in Adobe Illustrator, which I
assumed would be the equivalent of opening it in LaTex, but the graphic
looks perfect in Illustrator.

I'm afraid I don't have time right now to figure out how to install and
use LaTex. Perhaps someone else here has a suggestion.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #87542 is a reply to message #87537] Fri, 14 February 2014 08:11 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> So, there are a lot of smoke and mirror tricks that have be used. One of
> my tricks is to use a pixmap to do the drawing. That works for graphics
> windows, but not for PostScript files. In PostScript files, I tend to
> draw the text off the page and in the background color, hoping no one
> will notice. Obviously, I haven't been totally successful. :-(

Ah, it turns out I *wasn't* doing this in the background color as I
assumed I was. Try this version of the program and see if the results
are any better.

http://www.idlcoyote.com/programs/cglegenditem__define.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #87543 is a reply to message #87542] Fri, 14 February 2014 09:09 Go to previous messageGo to next message
elisadelgadomena is currently offline  elisadelgadomena
Messages: 6
Registered: February 2014
Junior Member
Hi David
Thanks for the quick answer. I will try that new.
In any case I changed to al_legend and it worked! Before I was using legend.pro, I didn't know this one, and I assumed that I had to use cglegend when using cgplot (since the normal legend.pro was not working with cgplot).
I kept the program as before, just changing from cglegend to al_legend and though the appearance of the eps opened with gb or similar is the same, when creating the pdf in latex nothing strange appears now.

Sorry for having bothered you, I just discovered now al_legend.
I don't know if it happens only in latex or when attaching the plot to other text editors too...
Re: Adding Legends to Coyote Graphics Windows [message #87544 is a reply to message #87543] Fri, 14 February 2014 09:22 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elisadelgadomena@gmail.com writes:

> Thanks for the quick answer. I will try that new.
> In any case I changed to al_legend and it worked! Before I was using legend.pro, I didn't know this one, and I assumed that I had to use cglegend when using cgplot (since the normal legend.pro was not working with cgplot).
> I kept the program as before, just changing from cglegend to al_legend and though the appearance of the eps opened with gb or similar is the same, when creating the pdf in latex nothing strange appears now.

Yes, AL_LEGEND does the smoke and mirror trick in a slightly different
way. It draws the legend twice, but then "erases" the first instance
by drawing a rectangle over the first instance in the background color.
My solution was an attempt to avoid drawing the entire legend twice. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #87545 is a reply to message #87544] Fri, 14 February 2014 10:04 Go to previous messageGo to next message
elisadelgadomena is currently offline  elisadelgadomena
Messages: 6
Registered: February 2014
Junior Member
It also works with the normal legend. Initially I thought it wasn't because the legend doesn't appear when plotting in the window but it does when saving in a ps, like al_legend.
I also tried with cglegenditem__define but happens the same as with cglegend, so it should be related to that trick of drawing and erasing, as you said.
Thanks a lot for your help and your time :)
Re: Adding Legends to Coyote Graphics Windows [message #87546 is a reply to message #87545] Fri, 14 February 2014 10:09 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elisadelgadomena@gmail.com writes:

> It also works with the normal legend. Initially I thought it wasn't because the legend doesn't appear when plotting in the window but it does when saving in a ps, like al_legend.
> I also tried with cglegenditem__define but happens the same as with cglegend, so it should be related to that trick of drawing and erasing, as you said.

I wonder if it is just because I draw outside the PostScript window?
Could you find this code in the cglegenditem__define.pro code (about
line 450 in my version):

IF !D.Name EQ 'PS' THEN BEGIN
xx = 0.1
yy=1.25
xsize = !D.X_Size
ysize = !D.Y_Size
ENDIF ELSE BEGIN

And change it to this:

IF !D.Name EQ 'PS' THEN BEGIN
xx = 0.1
yy = 0.85
xsize = !D.X_Size
ysize = !D.Y_Size
ENDIF ELSE BEGIN

Does that make any difference?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #87547 is a reply to message #87546] Fri, 14 February 2014 10:48 Go to previous messageGo to next message
elisadelgadomena is currently offline  elisadelgadomena
Messages: 6
Registered: February 2014
Junior Member
Indeed!! it makes a difference!
Now the legend is normal, but the titles appear again overplotted. However this time they already appear when opening the ps in gv (and of course with latex) since they are inside the axes limits.
So maybe the solution is to put bigger numbers there, so they won't appear in a normal A4 page (when inserting in an editor text like latex). I wonder if they will appear in the previous pages, hehehe
Re: Adding Legends to Coyote Graphics Windows [message #87548 is a reply to message #87547] Fri, 14 February 2014 10:54 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elisadelgadomena@gmail.com writes:

> Now the legend is normal, but the titles appear again overplotted. However this time they already appear when opening the ps in gv (and of course with latex) since they are inside the axes limits.

How is it that they "appear"? They are suppose to be written in the
background color. It would be truly remarkable if they "appear". ;-)

Did you use the version of the software that draws in the background
color? How many versions of the Coyote Library do you have on your
machine? Have you updated to the latest version recently? I mean, in the
last hour?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Adding Legends to Coyote Graphics Windows [message #87549 is a reply to message #87548] Fri, 14 February 2014 11:04 Go to previous messageGo to next message
elisadelgadomena is currently offline  elisadelgadomena
Messages: 6
Registered: February 2014
Junior Member
I installed coyote libraries for the first time last week, and I put the latest ones, but I did this change in the program that was already there, I didn't copy the link you sent a while ago, sorry if I was wrong
Now I have to leave but I will come back to this and let you know.

cheers, Elisa
Re: Adding Legends to Coyote Graphics Windows [message #87590 is a reply to message #87548] Mon, 17 February 2014 03:38 Go to previous messageGo to next message
elisadelgadomena is currently offline  elisadelgadomena
Messages: 6
Registered: February 2014
Junior Member
Hi again
You were right, now with the last version of cglegenditem__define everything is fine, there is no necessity of changing yy=1.25 to 0.85.
What I don't understand is why cglegend now also works fine if there is no difference between the previous and current version, contrary to what happens to cglegenditem__define

thanks
Re: Adding Legends to Coyote Graphics Windows [message #87594 is a reply to message #87590] Mon, 17 February 2014 05:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
elisadelgadomena@gmail.com writes:

> You were right, now with the last version of cglegenditem__define everything is fine, there is no necessity of changing yy=1.25 to 0.85.
> What I don't understand is why cglegend now also works fine if there is no difference between the previous and current version, contrary to what happens to cglegenditem__define

cgLegend is simply a one line wrapper for cgLegendItem for people who
are afraid of objects. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Writing an 8 Column array into a data file
Next Topic: 2D density plot and logarithmic axes

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

Current Time: Wed Oct 08 11:33:00 PDT 2025

Total time taken to generate the page: 0.00555 seconds