I am ploting the same values in python and in MATLAB ( The data is exactly the same).
just doing
import scipy.io as sio
zzz = sio.loadmat(pathToData)
plot(zzz['zzz'][:,0]) #python
In matlab
plot(zzz) %matlab
I am trying to get matplotlib
to create an image that looks the same as MATLAB figure, like this example.
- The following images where created with screen capture so to avoid any post processing of the image. I made sure both of the figures are in the same size. then I put one next to the other and created a screencapture of them both at the same time
I also put the lines one next to the other:
It is a bit hard to see but the MATLAB image is much more noisy and it looks like the python image is after a moving average of something like this ( especially in the start of plot)
Do you have any advice of how to make the python figure look exactly like the MATLAB one?
( I uploaded the data
if anyone interested in some experiments )
EDIT
I tried to do antialiased = False, the results are a bit better, but the linewidth is bigger no matter how small I try to do it (original screencapture )
data
(== zzz
) are the same, so the data-processing-phase is the point where to start from. However, if thezzz
inputs are not the same for MATLAB / python processing, check rather the data-generation-phase for any difference(s). You may also plot difference between the pair of zzz-datapoints ( one from MATLAB the other from python data-source ) to get more important details, better readable than from observing just the zoomed-in pixelised-GUI representations ) – user3666197