In [1]:
import scipy.io
import numpy
import os

percorsoIN = "/home/protoss/Documenti/TESI/DATI/candCoinc.mat"
candy = scipy.io.loadmat(percorsoIN)

candy1 = candy['candy'][0,0]['cand1']
candy2 = candy['candy'][0,0]['cand2']

frequenze = candy1[0]

critRat1 = candy1[5]
critRat2 = candy2[5]


---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-1-d48db9cc8391> in <module>()
      4 
      5 percorsoIN = "/home/protoss/Documenti/TESI/DATI/candCoinc.mat"
----> 6 candy = scipy.io.loadmat(percorsoIN)
      7 
      8 candy1 = candy['candy'][0,0]['cand1']

~/.local/lib/python3.5/site-packages/scipy/io/matlab/mio.py in loadmat(file_name, mdict, appendmat, **kwargs)
    133     """
    134     variable_names = kwargs.pop('variable_names', None)
--> 135     MR = mat_reader_factory(file_name, appendmat, **kwargs)
    136     matfile_dict = MR.get_variables(variable_names)
    137     if mdict is not None:

~/.local/lib/python3.5/site-packages/scipy/io/matlab/mio.py in mat_reader_factory(file_name, appendmat, **kwargs)
     56        type detected in `filename`.
     57     """
---> 58     byte_stream = _open_file(file_name, appendmat)
     59     mjv, mnv = get_matfile_version(byte_stream)
     60     if mjv == 0:

~/.local/lib/python3.5/site-packages/scipy/io/matlab/mio.py in _open_file(file_like, appendmat)
     21     if isinstance(file_like, string_types):
     22         try:
---> 23             return open(file_like, 'rb')
     24         except IOError as e:
     25             if appendmat and not file_like.endswith('.mat'):

FileNotFoundError: [Errno 2] No such file or directory: '/home/protoss/Documenti/TESI/DATI/candCoinc.mat'

In [7]:
from matplotlib import pyplot
%matplotlib notebook


figura = pyplot.figure()
scat = figura.add_subplot(111)
figura, scat = pyplot.subplots(figsize=(10, 7))
scat.scatter(frequenze,critRat1, s = 5, label='H')
scat.scatter(frequenze,critRat2, s = 5, label = 'L')
pyplot.semilogx()
pyplot.legend(loc='upper left');

pyplot.show()

In [ ]: