I’m using jupyter notebooks and the julia plots look pretty decent in those notebook files. however, when I use savefig command, it saves it in a terrible resolution (almost indiscernible.)
One way of circumventing this is possibly using size=(1200,800) while plotting. However, this can often lead to cut-off or hidden y-labels or x-labels, or weirdly scaled plot. This essentially means coming back to the code and keep trying with different size numbers until you get the “perfect resolution.”
I’m not exactly sure where I’m wrong but I just want to know if there’s a simple way to save high-res images by default (nothing super HDish, but workable similar to say, default saved MATLAB plots)
Depending on your type of graph, it may be better to use pdf instead of png/jpg as it is a vector graphic. Vector graphics are of arbitrary quality and you can zoom in “infinitely” without any pixelation.
svg is a vectors graphic format that may work as an alternative. Replace png with svg in your command and see if it works. It only works with some backends though.