dave poreh writes: > I want to make some plots and make the plots invisible, that means just i want to save the plots like this:
> p = plot(x(*,i),color='blue',thick=2)
> p.save, 'plot1.jpg'
> but without a window pops up,
Set the BUFFER keyword.
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
dave poreh writes: > Cool, i just put BUFFER=1 and it works,
Totally amazing, considering it's a function graphics routine! ;-)
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
On Sunday, November 11, 2012 1:23:52 PM UTC-7, David Fanning wrote:
> Totally amazing, considering it's a function graphics routine! ;-)
Hi David,
In fact, NG work very well for me, and for most of the people I talk to. We continue to improve them with every IDL release. The biggest issue I've had is that plots with large numbers of points (roughly 1e6) are slow to render, but we've greatly improved this for 8.2.2, due in January.
If you find problems with NG, please let us know. Constructive criticism will help us make them better.
Mark Piper writes:
> In fact, NG work very well for me, and for most of the people I talk to. We continue to improve them with every IDL release. The biggest issue I've had is that plots with large numbers of points (roughly 1e6) are slow to render, but we've greatly improved this for 8.2.2, due in January.
I agree they continue to improve with every release, but I am still too
gun-shy to adopt them for serious work. Sounds like we talk to different
people about function graphics. I run into few people who use them,
and those that do almost uniformly complain about how slow they are.
But, I hear fewer complaints about how they appear on the display. Most of
the problems now appear to be in creating file output from them. Lines
that suddenly grow to 10 times their normal size, and that kind of thing.
I should probably spend some time updating this page on contour
plots for IDL 8.2.1. I'd be curious to see how much things have improved
in both functionality and speed:
> I run into few people who use them,
> and those that do almost uniformly complain about how slow they are.
This isn't what I meant to write. I run into few people who use them,
but I meant to say I run into a number of people who have tried them
and *they* uniformly complain about how slow they are. The people who
use them don't seem bothered by their speed. But, I would say most of
the people I run into who have tried them don't use them because of
their speed.
Coyote writes: > I should probably spend some time updating this page on contour
> plots for IDL 8.2.1. I'd be curious to see how much things have improved
> in both functionality and speed:
Ok, I give up! I spent a couple of hours trying to
get this plot to work in IDL 8.2.1, and there is
no way I can get the damn colorbar to work! I have
NO idea what I am doing wrong. I am using code
straight out of the documentation and I don't
EVER see a taper on my color bar.
Can anyone help? Just replicate the contour
plot shown in that article in IDL 8.2.1.
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
David Fanning writes: > > I should probably spend some time updating this page on contour
> > plots for IDL 8.2.1. I'd be curious to see how much things have improved
> > in both functionality and speed:
> Ok, I give up! I spent a couple of hours trying to
> get this plot to work in IDL 8.2.1, and there is
> no way I can get the damn colorbar to work! I have
> NO idea what I am doing wrong. I am using code
> straight out of the documentation and I don't
> EVER see a taper on my color bar.
> Can anyone help? Just replicate the contour
> plot shown in that article in IDL 8.2.1.
Another hour, and still no joy. Here is what
I have so far, if anyone wants to have a crack
at this.
1. Contour plot doesn't honor POSITION keyword.
2. Contour plot doesn't use correct colors.
3. Only half of box axes in place.
4. Color bar has correct colors, but no taper.
5. Color bar not labeled correctly.
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
From my perspective, the concept of the IDL new graphics functions are exactly what I was looking for. I can add (or remove) things to them as I want, and the usual qualitative investigative things one wants to do with a data plot (zoom, translate, rotate) tools are finally built in (without having to resort to an iTool). [Ed: Hey, I can jump on the OO bandwagon just as fast as the next guy...]
And they're relatively easy to use -- although the keyword usage could be applied more consistently across function (e.g. vertical_alignment and horizontal_alignment is used for some, whereas for others the latter is referred to as just "alignment"). I think the IDL folks have discovered the right path for a better user interface to their object graphics engine.
Finally, the output just looks much nicer than anything I ever produced with DG.
Anyone who reads this newsgroup knows there are, uh, issues with certain aspects of creating graphics in NG (e.g. altogether now: COLORBAR! :o) but I'm encouraged by the IDL folk's attention to these issues over the last year or two (e.g. MarkP and ChrisT regularly reply to this newsgroup, updates are more frequent addressing user concerns, etc).
But the big hairy 800 pound primate in the room is the real time execution speed of NG -- which must be addressed to make NG be taken seriously (and by that I mean for day-to-day data visualisation, not the "produce the final graphic for publication" usage). Until the speed of the NG plots rivals that of DG, I reckon a lot of folks aren't going to use them. And people new to IDL will likely ditch it for something faster. And FWIW, not all of us have the latest greatest hardware out there - my nearly 3-year old desktop linux box was a low-to-medium-end machine (i.e. relativly slow) when I got it.
> On Sunday, November 11, 2012 1:23:52 PM UTC-7, David Fanning wrote:
>> Totally amazing, considering it's a function graphics routine! ;-)
> Hi David,
> In fact, NG work very well for me, and for most of the people I talk
> to. We continue to improve them with every IDL release. The biggest
> issue I've had is that plots with large numbers of points (roughly
> 1e6) are slow to render, but we've greatly improved this for 8.2.2,
> due in January.
> If you find problems with NG, please let us know. Constructive
> criticism will help us make them better.
Paul van Delst writes: > Anyone who reads this newsgroup knows there are, uh, issues with certain > aspects of creating graphics in NG (e.g. altogether now: COLORBAR! :o)
If the color bar doesn't work, the graphics system
doesn't work, as far as I'm concerned. I mean, come
on, we are trying to do science here!
I'm still not sure it is possible, two and a half
years after this system first came out, to compare
two images side-by-side.
I literally spent three hours yesterday, trying
to create a simple contour plot (which no one has yet helped me with, probably because it is
impossible to create). So, clearly, these
things are not "intuitive". And, to call the
documentation "abysmal" is to be WAY too
generous.
I really don't know what to make of people telling
me these things "work well". What, exactly, are
they doing with the damn things!? It makes me
feel like an idiot when I can't get one simple
thing to work without literally spending hours and
hours trying to figure it out. You'd think it was
the remote control to the TV the way I struggle with it! :-(
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
> And, to call the documentation "abysmal" is to be WAY too generous.
Things could be worse. When I got to work this morning, my boss,
who is trying to learn the entirely new and revamped ENVI GUI interface,
points out that the "User Guide" (i.e., tutorial as to how to use
the new interface) is a whopping two and a half pages long!
David Fanning writes: > > I should probably spend some time updating this page on contour
> > plots for IDL 8.2.1. I'd be curious to see how much things have improved
> > in both functionality and speed:
> Ok, I give up! I spent a couple of hours trying to
> get this plot to work in IDL 8.2.1, and there is
> no way I can get the damn colorbar to work! I have
> NO idea what I am doing wrong. I am using code
> straight out of the documentation and I don't
> EVER see a taper on my color bar.
> Can anyone help? Just replicate the contour
> plot shown in that article in IDL 8.2.1.
Seriously? No help whatsoever!?
OK, then I think three conclusions are possible.
1. Despite claims to the contrary, no one outside
of Exelis uses function graphics.
2. If people do use function graphics, they can't
figure out how to do this simple contour plot
example with them.
3. The example is so trivial that no one wants to
embarrass me further by pointing out my obvious
inability to understand the very simplest things.
If conclusion 3 is the true conclusion, then I urge you to come forward anyway. I'm going to
blame everything on Coyote, of course, so no permanent
damage can be done. ;-)
1. Contour plot doesn't honor POSITION keyword.
2. Contour plot doesn't use correct colors.
3. Only half of box axes in place.
4. Color bar has correct colors, but no taper.
5. Color bar not labeled correctly.
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
David Fanning writes: > Seriously? No help whatsoever!?
By the way, the article only seeks to record the
time it takes to render the graphics result, not
the time it takes to write the code! This is a
learning experience, after all. :-)
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Alain writes: > Ten minutes with your example gave me the following:
Ah. I would have thought the word "duplicate" came
from the French, but apparently not. ;-)
OK, I have completely given up on getting an exact
duplication of the plot I want, but it has to be
considerably closer than this example!
Robert Vincent and I spent another couple of hours
working on this together last night. Although Robert
had decided to give up on function graphics by the end
of the night, I'm dumb enough to keep plodding onward.
Anyway, together we came up with something that was
showing some promise. Here is a comparison between the plot we are trying to duplicate on the left,
and the plot we have come up with on the right:
It took nearly forever to figure out the color bar,
but we finally got it.
There are obvious problems. The FG contour plot is
still VERY small in the window. We haven't been able
to figure out how to make it bigger. It seems to
ignore the POSITION keyword we are passing to it.
The box axes are a total joke. You can only label
them on two sides, and even then, you can't label
them as normal box axes.
But, still, it was looking pretty good. At least
it was until I took a close look at the lines that
we overplot onto the filled contours. You have to
blow up the plot to see this really well, so here
is a blow up of the FG contour plot:
We welcome any and all to tell us what we are doing
wrong.
Cheers,
David
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
You should have read more carefully and executed the code I sent previously. It is pretty close of what you want. The trick is to draw the map first, then to overplot the filled and line contours. A slightly modified version follows:
;-----------------------------------------
restore, 'air.nc.data.sav'
t = systime(1)
Alain writes: > You should have read more carefully and executed the code > I sent previously. It is pretty close of what you want. > A slightly modified version follows:
OK, close. I think this is nearly what we want, except
for those extraneous labels. Here is a picture of
the final output:
> The trick is to draw the map first, then to overplot the > filled and line contours.
Yes, I would have probably discovered this trick for
myself, had I spent another 8-10 hours on the problem!
I certainly wouldn't have discovered it in the documentation.
Thanks for your help!
David
;****************************************************
PRO FG_Map_Contour
restore, 'air.nc.data.sav'
nlevels = 12
xrange = [Min(lon), Max(lon)]
yrange = [Min(lat), Max(lat)]
center_lon = (xrange[1]-xrange[0])/2.0 + xrange[0]
nlevels = 12
levels = cgConLevels(Float(data), NLevels=nlevels+1, $
MinValue=Floor(Min(data)), STEP=step, Factor=1)
mylat = 40.6 ; Latitude of Fort Collins, Colorado.
mylon = 254.9 ; Longitude of Fort Collins, Colorado.
s = Symbol(mylon, mylat, /Data, /Current, 'Star', $
/Sym_Filled, Sym_Color='red')
win.Refresh
END
;****************************************************
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
-- David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")