Saving my Plot as Jpg not working
9 次查看(过去 30 天)
显示 更早的评论
I´m currently writing a program that´ll take data from an experiment and then save its plot. Sadly it doesnt wanna save it and I keep getting errors. The program is taking 2 columns of a CSV, plot them and should (even though it doesnt wanna work) save them. You guys will find the csv file as well as the program attached to this. Thanks for taking the time to read my Problem
0 个评论
回答(2 个)
Star Strider
2018-10-26
I’m not sure what you want to do. I don’t see any commands in you code to save anything.
If you want to save your plot or an image of it, use the saveas (link) function, or one of the other functions linked within or at the end of that page.
0 个评论
Image Analyst
2018-10-26
What are the errors? You forgot to post them. Please attach all the red error text.
I ran it and it ran fine. I saved it from the toolbar icon into a PNG file:
I recommend you use export_fig http://blogs.mathworks.com/pick/2010/05/28/creating-and-exporting-publication-quality-graphics/ to save the axes or figure into a PNG file. No one likes JPG files anymore because of the bad compression artifacts it introduces.
I do praise you for writing pretty good code though. I like all the numerous comments in there and the use of descriptive variable names (not an impenetrable alphabet soup).
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!