pysilcam/plotting.py
def nd(stats, settings, ax, line=None, c='k', sample_volume=1.):
    '''
    Plot the particle number distribution, scaled to the given sample volume
    
    Args:
        stats (DataFrame)           : particle statistics from silcam process
        settings (PySilcamSettings) : settings associated with the data, loaded with PySilcamSettings
        ax ()                       : axis to plot data on
        line=None ()                : ?? possibly an option to rapidly replace a proviously plotted line??
        c='k' (str)                 : color of the line to be plotted
        sample_volume=1. (float)    : the volume of water sampled in creating the stats DataFrame

    Returns:
        line ()                     : ?? the plotted line, possible returned incase of future adjustment??
        
    '''
    # nc per size bin per sample volume
    dias, nd = sc_pp.nd_from_stats(stats, settings)

    nd = sc_pp.nd_rescale(dias, nd, sample_volume)

    # remove data from first bin which will be part-full
    ind = np.argwhere(nd>0)
    nd[ind[0]] = np.nan

    # don't plot zeros
    ind = np.argwhere(nd == 0)
    nd[ind] = np.nan

    if line:
        line.set_data(dias, nd)
    else:
        line, = ax.plot(dias,nd, color=c)
        ax.set_xscale('log')
        ax.set_yscale('log')
        ax.set_xlabel('Equiv. diam [um]')
        ax.set_ylabel('Number concentration [#/L/um]')
    ax.set_xlim(10, 10000)
#    ax.set_ylim(0, 100)

    #ax.axvline(sc_pp.d50_from_vd(vd,dias), color=c)

    return line

    Plot the particle number distribution, scaled to the given sample volume
    
    Args:
        stats (DataFrame)           : particle statistics from silcam process
        settings (PySilcamSettings) : settings associated with the data, loaded with PySilcamSettings
        ax ()                       : axis to plot data on
        line=None ()                : ?? possibly an option to rapidly replace a proviously plotted line??
        c='k' (str)                 : color of the line to be plotted
        sample_volume=1. (float)    : the volume of water sampled in creating the stats DataFrame

    Returns:
        line ()                     : ?? the plotted line, possible returned incase of future adjustment??
        
    
Plot the particle number distribution, scaled to the given sample volume
Plot the particle number distribution scaled to the given sample volume
def nd(stats, settings, ax, line=None, c='k', sample_volume=1.):
    dias, nd = sc_pp.nd_from_stats(stats, settings)
    nd = sc_pp.nd_rescale(dias, nd, sample_volume)
    ind = np.argwhere(nd>0)
    nd[ind[0]] = np.nan
    ind = np.argwhere(nd == 0)
    nd[ind] = np.nan
    if line:
        line.set_data(dias, nd)
    else:
        line, = ax.plot(dias,nd, color=c)
        ax.set_xscale('log')
        ax.set_yscale('log')
        ax.set_xlabel('Equiv. diam [um]')
        ax.set_ylabel('Number concentration [#/L/um]')
    ax.set_xlim(10, 10000)
    return line
def nd ( stats , settings , ax , line = None , c = 'k' , sample_volume = 1. ) : dias , nd = sc_pp . nd_from_stats ( stats , settings ) nd = sc_pp . nd_rescale ( dias , nd , sample_volume ) ind = np . argwhere ( nd > 0 ) nd [ ind [ 0 ] ] = np . nan ind = np . argwhere ( nd == 0 ) nd [ ind ] = np . nan if line : line . set_data ( dias , nd ) else : line , = ax . plot ( dias , nd , color = c ) ax . set_xscale ( 'log' ) ax . set_yscale ( 'log' ) ax . set_xlabel ( 'Equiv. diam [um]' ) ax . set_ylabel ( 'Number concentration [#/L/um]' ) ax . set_xlim ( 10 , 10000 ) return line
Plot the particle number distribution, scaled to the given sample volume
Plot the particle number distribution scaled to the given sample volume
'''
    Plot the particle number distribution, scaled to the given sample volume
    
    Args:
        stats (DataFrame)           : particle statistics from silcam process
        settings (PySilcamSettings) : settings associated with the data, loaded with PySilcamSettings
        ax ()                       : axis to plot data on
        line=None ()                : ?? possibly an option to rapidly replace a proviously plotted line??
        c='k' (str)                 : color of the line to be plotted
        sample_volume=1. (float)    : the volume of water sampled in creating the stats DataFrame

    Returns:
        line ()                     : ?? the plotted line, possible returned incase of future adjustment??
        
    ''' # nc per size bin per sample volume # remove data from first bin which will be part-full # don't plot zeros #    ax.set_ylim(0, 100) #ax.axvline(sc_pp.d50_from_vd(vd,dias), color=c)
None
stats
particle statistics from silcam process
particle statistics from silcam process
settings
settings associated with the data, loaded with PySilcamSettings
settings associated with the data loaded with PySilcamSettings
ax
line
c
sample_volume
ax ()                       
axis to plot data on
axis to plot data on
line=None ()                
None
c='k'
color of the line to be plotted
color of the line to be plotted
sample_volume=1.
the volume of water sampled in creating the stats DataFrame
the volume of water sampled in creating the stats DataFrame