On 2015-12-19 11:42+0100 Laurent Berger wrote:

> Thanks for your answer. I have missed option -locate and now I can see 
> coordinate in example x01c. It's really a good idea to  insert example name 
> with function description in doc:-) .
> Now I want to get coordinates in a program like wxPLplotdemo and I don't know 
> where to insert this function in my code. I have try to insert in mouse 
> event( left button down) like this:
>
> void FenetreCourbe::OnLeftDown(wxMouseEvent& event)
> {
>    PLGraphicsIn x;
>    plGetCursor(&x);
>    wxString s;
>    s.Printf("%f %f %d %d",x.dX,x.dY,x.pX,x.pY);
>    wxMessageBox(s);
> }
>
> but coordinates are always -1 -1 -1 -1 when I click in curve. I don't know 
> what to modify to get this coordinates.

Hi Laurent:

I suggest you follow exactly what is done in example 1 code since that
obviously works for you.  For example, surround the section of your
code that is outputting text with

pltext();
<text output code>
plgra();

To see more about these functions, look at
<http://plplot.sourceforge.net/docbook-manual/plplot-html-5.11.1/pltext.html>
and
<http://plplot.sourceforge.net/docbook-manual/plplot-html-5.11.1/plgra.html>.

Also my above advice is based on examples/c/x01.c, but assuming you want to
programme this in C++, you should follow the syntax for the PLplot
commands in examples/c++/x01.cc.

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to