I’m running an app written by some scientists. App is made to fit an experimental data to the model of the technique employed. Results are few figures. As the app doesn’t allow you to save the figures as PNG, JPG or any other format, I wanted to plot them myself by saving the data in .txt file.
App window is shown here.
There are three graphs, as you can see. For the main graph, I was able to save the data by using save function. Function was added after lines of code where plotting of this graph is done. To be clear, I do have access to the code even though I didn’t make the app myself.
However, for the 2nd graph on the upper right (confidence interval of the parameters), save function doesn’t work and my data isn’t getting saved in the separate .txt file. Neither does it get saved inside the first file (I tried).
Here is the line of code added for saving the data for the 2nd graph (line 457).
2
You cannot call save
with an expression like boundary_cov(1,:)
. You need either to save whole variables, or use something like writematrix
, like so:
writematrix(boundary_cov(1:2,:), 'conf.txt')
Let me rephrase your issue, so we can sort it out.
Problem: You have some GUI exe file that is supposed to reproduce some graphs based on the data loaded into the matrix. Since, you cannot save the plots you want to get the plot data and reproduce the plots by your code and save the images for report use or etc.??
So far it seems an easy issue but for that you need to share some images of your code file so we can walk thru it together. But just to give you the raw idea.
General Solution: You need to look into the code lines in which it lies the function or line that is plotting the data then you take that variable save it as .mat file or .csv whatever you like to. Then you can plot it, producing same output.