I have a plot of an unknown function stored as a PNG file in a folder in which Mathematica file also is saved. I have used
SetDirectory[NotebookDirectory[]];
importedplot = Import["plot.png"];
I am going to redraw it by ListPlot if I was able to extract data from this plot.
I have seen this page and this one but I could not understand what must be replaced by for example Plot[Tan@x, {x, 0, 2 Pi}] in command
data = Cases[Plot[Tan@x, {x, 0, 2 Pi}], Line[data_] :> data, -4, 1][[1]];
Export["file.txt", data, "Table"]
As it used in the pages addressed. Can anyone guide me!
plot.pngas an image! – Ulrich Neumann Dec 10 '23 at 13:45extract data from image. There are many examples. – Edmund Dec 10 '23 at 19:53