Generate Code for MATLAB using ImageJ

Hopefully I can explain this properly --
I have a JPEG file of a graph. On this graph are 10+ lines/curves. I don't have the data that was used to produced these lines/curves, but I want to create code for the graph in MATLAB.
My question: Is there a way I can use ImageJ and MATLAB together to both measure the existing JPEG image and then extrapolate MATLAB code from that? In the end, I would like the user to access a drop-down menu (or slider, doesn't matter) to view 1 or all lines with MATLAB.
Is this possible?
Edit: If this is possible with just MATLAB, that is fine, too!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by