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.
Le 18/12/2015 23:54, Alan W. Irwin a écrit :
> On 2015-12-18 23:03+0100 Laurent Berger wrote:
>
>> Hi,
>>
>> In plplot using wxwidgets driver which function must I use to get data
>> coordinates using mouse event?
>>
>> I have try plGetCursor in an event callback but i connot retrieve
>> coordinate.
>
> Hi Laurent:
>
> Look at examples/c/x01c.c for an example of how plGetCursor should
> be used.
>
> If you get a good result with an interactive device accessible to you
> for example 1 with the -locate command-line option, but not -dev
> wxwidgets, that would be a bug in -dev wxwidgets. However, although I
> don't have access to wxwidgets at the moment, I am pretty sure I have
> already made that check in the past, and there was no such bug in -dev
> wxwidgets compared to the good interactive results that occur for the
> xwin, xcairo, and qtwidget devices.
>
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel