Re: [Plplot-devel] using plplot for interactive financial graphs?

2009-02-03 Thread Vadim Zeitlin
On Mon, 02 Feb 2009 21:32:26 -0500 Hazen Babcock  wrote:

HB> >  The first of these things is the display of so-called candlestick graphs:
HB> > 
HB> >   http://en.wikipedia.org/wiki/Candlestick_chart
HB> > 
HB> > This genuinely doesn't seem to be supported as it was requested before:
HB> > 
HB> > 
http://www.mail-archive.com/plplot-devel@lists.sourceforge.net/msg00650.html
HB> > 
http://www.mail-archive.com/plplot-devel@lists.sourceforge.net/msg00699.html
HB> > 
HB> > but nothing seems to have happened since then.
...
HB> Now that it has come up twice we might be more interested :). Probably 
HB> the first thing would be implement a C function that could create the 
HB> graph that you wanted. This would likely be done with a number of plline 
HB> ()/plfill() function calls to draw each point.

 Thanks for your answer and advice! I've started looking into actually
doing something like this and realized that there is actually a third
potential problem: is it possible to provide the plot data on demand with
PLplot? E.g. with these financial plots you may have data for some market
price from 1990 to 2008 with the resolution of one day. Usually the user of
the application would just look at some small subrange of this interval,
e.g. a couple of last months but I'd like to allow zooming and panning the
graph to show more (or less) values and would like to avoid creating all
the plot points unnecessarily and only do it when they're about to be
shown. Would you have any idea about how could this be done?


HB> >  The second thing is that I'd like to have some degree of interactivity.
...
HB> Most of the interactive drivers support basic interactivity with the 
HB> function plGetCursor().

 I'm not sure if this is what I'm looking for, as I can get the mouse
events by directly catching them in wx. I just needed to know how to
translate their coordinates to PLplot ones and the post by Hezekiah M.
Carty seems to answer this nicely (thanks a lot!).

 Thanks again,
VZ


pgpRgR2T0H8zU.pgp
Description: PGP signature
--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] using plplot for interactive financial graphs?

2009-02-03 Thread Maurice LeBrun
On Tuesday, February 3, 2009 at 17:34:02 (+0100) Vadim Zeitlin writes:
 >  Thanks for your answer and advice! I've started looking into actually
 > doing something like this and realized that there is actually a third
 > potential problem: is it possible to provide the plot data on demand with
 > PLplot? E.g. with these financial plots you may have data for some market
 > price from 1990 to 2008 with the resolution of one day. Usually the user of
 > the application would just look at some small subrange of this interval,
 > e.g. a couple of last months but I'd like to allow zooming and panning the
 > graph to show more (or less) values and would like to avoid creating all
 > the plot points unnecessarily and only do it when they're about to be
 > shown. Would you have any idea about how could this be done?

Dunno about wx, but with TK you can easily hijack the default key/mouse
handlers with those of your own choosing.  In addition the TK bindings have a
plw::set_zoom_handler proc so that you can reuse some of the native zoom
logic.  By doing your own key/mouse handling, there's no limit to the kinds of
special effects you can mix in, including selective plotting of data as you
mention.

So one can imagine a tool that models zillions of plot elements, each of which
only become visible once zoomed to a sufficiently high resolution.  This gets
around the limitations of the 16-bit driver interface (regarding accuracy at
high zoom levels) and performance implications of plotting enormous quantities
of sub-pixel-resolution (therefore redundant) plot elements.

-- 
Maurice LeBrun

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] gnat 4.4

2009-02-03 Thread Orion Poplawski
We're currently getting ready for gcc 4.4 in Fedora Devel.  On issue is 
that ada.cmake only looks for up to gnat-4.3.  This always bugs me as a 
limitation on cmake.  Any way to be more robust finding newer versions?

-- 
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA DivisionFAX: 303-415-9702
3380 Mitchell Lane  or...@cora.nwra.com
Boulder, CO 80301  http://www.cora.nwra.com

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] using plplot for interactive financial graphs?

2009-02-03 Thread Hazen Babcock
Vadim Zeitlin wrote:
> On Mon, 02 Feb 2009 21:32:26 -0500 Hazen Babcock  wrote: 
> HB> >  The second thing is that I'd like to have some degree of interactivity.
> ...
> HB> Most of the interactive drivers support basic interactivity with the 
> HB> function plGetCursor().
> 
>  I'm not sure if this is what I'm looking for, as I can get the mouse
> events by directly catching them in wx. I just needed to know how to
> translate their coordinates to PLplot ones and the post by Hezekiah M.
> Carty seems to answer this nicely (thanks a lot!).

One of things that plGetCursor() returns is the location of the mouse 
click in PLplot coordinates, in addition to the location in pixels.

-Hazen


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] gnat 4.4

2009-02-03 Thread Alan W. Irwin
On 2009-02-03 16:35-0700 Orion Poplawski wrote:

> We're currently getting ready for gcc 4.4 in Fedora Devel.  On issue is
> that ada.cmake only looks for up to gnat-4.3.  This always bugs me as a
> limitation on cmake.  Any way to be more robust finding newer versions?

Hi Orion:

Thanks for your report of this issue for gcc 4.4.

What happens if you change

find_library(GNAT_LIB NAMES gnat gnat-4.1 gnat-4.2 gnat-4.3)

to

find_library(GNAT_LIB NAMES gnat gnat-4.1 gnat-4.2 gnat-4.3 gnat-4.4)

in cmake/modules/ada.cmake?

If that works, I will commit it.

I considered your plea for a more robust method.  You could have CMake run
the gnat compiler after it has found it with the --version option to get a
version string.  That option works for the gnatgcc compiler, but I am not
sure it works for all gnat compilers so you would have to deal with the
potential situation where that option failed. Furthermore, there is no
guarantee what the corresponding name of the library will be in all cases.
Of course, from the above list you could make a pretty good guess from the
compiler version string if that was available. So with some care I think you
could certainly prefix the above list with a variable that would tend to
work most of the time for future versions.  I would be happy to apply such a
patch if somebody wants to make this effort.  OTOH, perhaps a simple list
that we extend periodically as new versions become available is good enough
for now according to the KISS principle.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] gnat 4.4

2009-02-03 Thread Orion Poplawski

On Tue, February 3, 2009 6:09 pm, Alan W. Irwin wrote:
> On 2009-02-03 16:35-0700 Orion Poplawski wrote:
>
>> We're currently getting ready for gcc 4.4 in Fedora Devel.  On issue is
>> that ada.cmake only looks for up to gnat-4.3.  This always bugs me as a
>> limitation on cmake.  Any way to be more robust finding newer versions?
>
> Hi Orion:
>
> Thanks for your report of this issue for gcc 4.4.
>
> What happens if you change
>
> find_library(GNAT_LIB NAMES gnat gnat-4.1 gnat-4.2 gnat-4.3)
>
> to
>
> find_library(GNAT_LIB NAMES gnat gnat-4.1 gnat-4.2 gnat-4.3 gnat-4.4)
>
> in cmake/modules/ada.cmake?

That's what I'm doing at the moment.


-- 
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA DivisionFAX: 303-415-9702
3380 Mitchell Lane  or...@cora.nwra.com
Boulder, CO 80301  http://www.cora.nwra.com

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel