Skip to content

Support generic reading of Feedback #5

@acidtonic

Description

@acidtonic

First, thanks for your work on the project.

I am trying to create an image and dump it to the console instead of through a file. I am able to do so by setting the terminal to pngcairo and avoid setting an output.

It seems that the mechanism to read back from the process is geared towards mouse feedback, but I noticed you have all the required components already in the code, it's just private.

https://github.com/dstahlke/gnuplot-iostream/blob/master/gnuplot-iostream.h#L1821

Can we perhaps adjust things slightly so that allocFeedback is public and can be called by the user, and a public getter for the GnuplotFeedback pointer?

This way I could read the generated png out of the console instead of going to the disk.

My ideal usage would be something like....


gp << "graph commands here";
gp.allocFeedback();
GnuplotFeedback * feedback = gp.feedback //(or a const getter)
gp.send1d(mydata);
File * pngFile = feedback->handle();
//Code to render the file or do whatever here. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions