2
$\begingroup$

I periodically summarize my experiments by copying best-looking ListLinePlots into a new notebook and saving it to Wolfram Cloud. What is a good approach to also save the data used to generate the plot? IE, in case I want to regenerate the plot later with different data-range or style.

One potential way, I could just evaluate the data object, and collapse the cell to make it invisible, but not sure how to recover it...would I need to copy paste the 10MB output cell into input cell and evaluate it to recover the data? So wondering if there are alternative solutions (perhaps along the lines of Manipulate which does some magic with SaveDefinitions->True)

$\endgroup$
1

1 Answer 1

0
$\begingroup$

You can retrieve your data from the graphic generated by ListLinePlot.

Example :

ListLinePlot[Sin /@ Range[0,2 Pi,Pi/5]]  

enter image description here

Type gr00= before your graphic :

enter image description here

Evaluate the cell :

enter image description here

Your data are in gr00 :

gr00 // Normal //Cases[#,Line[___],{1,-1}]&

enter image description here

Normalis useless here but would be usefull for some graphics generated by somme other functions of the *Plot* family (Plot3D ...)

related

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.