gnuplot-iostream icon indicating copy to clipboard operation
gnuplot-iostream copied to clipboard

read variables back into the program

Open ClundXIII opened this issue 5 years ago • 2 comments

Hi,

I need to do a few (~ 650k) fits from within my program. Is it possible to automatically read the result back into a variable? Or should I rather use the higher-level interface for this case?

Regards, Simon

ClundXIII avatar Feb 06 '20 16:02 ClundXIII

No, this is not possible currently.  My interface doesn't currently have the ability to receive feedback back from gnuplot.  It is able to capture mouse clicks, but that works by telling gnuplot to send that info to a file (technically, a pty) and I read it from there.

It would be feasible to add this feature, but it'd take some work.  Even if such a thing did work though, I think it'd probably be better to just do the fit from within your program (not through gnuplot) using some library designed for that purpose.  Any linear algebra package would make it easy to compute a linear fit, or even fit a linear combination of nonlinear functions, e.g., a polynomial.  For more general fitting, I know such a library exists but I can't remember the name of it.

  • Dan

On 2/6/20 8:51 AM, Simon Michalke wrote:

Hi,

I need to do a few (~ 650k) fits from within my program. Is it possible to automatically read the result back into a variable? Or should I rather use the higher-level interface for this case?

Regards, Simon

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dstahlke/gnuplot-iostream/issues/14?email_source=notifications&email_token=AACMO4GNNF23EIZOSOI5NGTRBQ52XA5CNFSM4KRAMLF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ILSKJBA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACMO4BRSSIGGID7HJYAZVLRBQ52XANCNFSM4KRAMLFQ.

dstahlke avatar Feb 18 '20 06:02 dstahlke

Okay, thanks. I will most likely use dlib for fitting. The curve is unfortunately not trivial.

ClundXIII avatar Feb 18 '20 15:02 ClundXIII