I am trying to save some plots. But the syntax below gives me Part, Set and FilterRules errors.
teste4 := Return[Plot[ x, {x, 0, 10}]]; Export["/Users/tomasalvim/Desktop/teste.png", teste4]
Does anyone know what the correct syntax should be to save the plot inside the Return[]?
Error: ""Part specification $Failed[[3,2]] is longer than depth of object""
Thank you in advance
DumpSavethe output of the slow calculation, restart the Kernel, and thenGetthe saved file again. Also, try usingEcho[expr, "Label", Head]or similar to debug intermediate steps. Somewhere you are getting a$Failed. Furthermore, use scoping and other techniques to avoid lingering definitions. – rhermans Feb 20 '23 at 11:32