hi Guys,
I am trying to use Plots.plot to save images in REPL on ubuntu. However it always save the picture upside down even if I have not do anything on the image yet.
Please help.
julia Version 1.1.1 (2019-05-16)
using Plots,Images
backend() #Plots.GRBackend()
pic=Images.load(“image_orig.png”);
Plots.plot(pic);
Plots.savefig(“myplot_test.png”) #open the picture of myplot_test.png in browser, the pic is upside down
I’m not very familiar with Plots.jl but try setting yflip = true, it’s quite common for plotting packages to put (0,0) on the top left corner instead of the bottom left.
I’m facing a similar problem. It seems that image plotting won’t flip the y axis no matter how you put it. I’ve managed to go around that by reversing the array itself: plot(img[end:-1:begin,:]) but of course that leaves now the y-ticks in the wrong order.