From ca119149561a000278bc22afbdf9edf05f23e155 Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Tue, 27 Oct 2020 19:59:26 +0100 Subject: [PATCH 1/3] [statistics] backward compatibility of hist density - still buggy! --- plotstyle.py | 2 +- statistics/lecture/diehistograms.py | 5 ++++- statistics/lecture/displayunivariatedata.py | 2 +- statistics/lecture/kerneldensity.py | 10 ++++++++-- statistics/lecture/pdfhistogram.py | 8 ++++++-- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/plotstyle.py b/plotstyle.py index 06aa015..7c85d36 100644 --- a/plotstyle.py +++ b/plotstyle.py @@ -2,7 +2,7 @@ import matplotlib as mpl import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D -xkcd_style = False +xkcd_style = True # default size of figure: figure_width = 15.0 # cm, should be set according to \textwidth in the latex document diff --git a/statistics/lecture/diehistograms.py b/statistics/lecture/diehistograms.py index 91200f7..c5d03fb 100644 --- a/statistics/lecture/diehistograms.py +++ b/statistics/lecture/diehistograms.py @@ -27,6 +27,9 @@ ax2.set_xlabel('x') ax2.set_ylim(0, 0.23) ax2.set_ylabel('Probability') ax2.plot([0.2, 6.8], [1.0/6.0, 1.0/6.0], zorder=-10, **lsAm) -ax2.hist([x2, x1], bins, density=True, zorder=-5, **fs) +try: + ax2.hist([x2, x1], bins, density=True, zorder=-5, **fs) +except AttributeError: + ax2.hist([x2, x1], bins, normed=True, zorder=-5, **fs) fig.subplots_adjust(left=0.125) fig.savefig('diehistograms.pdf') diff --git a/statistics/lecture/displayunivariatedata.py b/statistics/lecture/displayunivariatedata.py index 31977fe..f56906a 100644 --- a/statistics/lecture/displayunivariatedata.py +++ b/statistics/lecture/displayunivariatedata.py @@ -4,7 +4,7 @@ import matplotlib.gridspec as gridspec from scipy.stats import gaussian_kde from plotstyle import * -sketch_style() +#sketch_style() #rng = np.random.RandomState(981) #data = rng.randn(40, 1) + 4.0 rng = np.random.RandomState(1981) diff --git a/statistics/lecture/kerneldensity.py b/statistics/lecture/kerneldensity.py index 2b608a0..2a0cbb7 100644 --- a/statistics/lecture/kerneldensity.py +++ b/statistics/lecture/kerneldensity.py @@ -44,7 +44,10 @@ ax.set_ylabel('p(x)') ax.set_ylim(0.0, 0.49) ax.set_yticks(np.arange(0.0, 0.41, 0.1)) #ax.plot(x, g, '-b', lw=2, zorder=-1) -ax.hist(r, np.arange(-4.1, 4, 0.4), density=True, zorder=-5, **fsC) +try: + ax.hist(r, np.arange(-4.1, 4, 0.4), density=True, zorder=-5, **fsC) +except AttributeError: + ax.hist(r, np.arange(-4.1, 4, 0.4), normed=True, zorder=-5, **fsC) ax = fig.add_subplot(spec[1, 0]) ax.set_xlabel('x') @@ -54,7 +57,10 @@ ax.set_ylabel('p(x)') ax.set_ylim(0.0, 0.49) ax.set_yticks(np.arange(0.0, 0.41, 0.1)) #ax.plot(x, g, '-b', lw=2, zorder=-1) -ax.hist(r, np.arange(-4.3, 4, 0.4), density=True, zorder=-5, **fsC) +try: + ax.hist(r, np.arange(-4.3, 4, 0.4), density=True, zorder=-5, **fsC) +except AttributeError: + ax.hist(r, np.arange(-4.3, 4, 0.4), normed=True, zorder=-5, **fsC) ax = fig.add_subplot(spec[:, 1]) ax.set_xlabel('x') diff --git a/statistics/lecture/pdfhistogram.py b/statistics/lecture/pdfhistogram.py index cccd146..cddffa6 100644 --- a/statistics/lecture/pdfhistogram.py +++ b/statistics/lecture/pdfhistogram.py @@ -24,8 +24,12 @@ ax2.set_ylabel('Probab. density p(x)') ax2.set_ylim(0.0, 0.44) ax2.set_yticks(np.arange(0.0, 0.41, 0.1)) ax2.plot(x, g, zorder=-1, **lsA) -ax2.hist(r, 5, density=True, zorder=-10, **fsB) -ax2.hist(r, 20, density=True, zorder=-5, **fsC) +try: + ax2.hist(r, 5, density=True, zorder=-10, **fsB) + ax2.hist(r, 20, density=True, zorder=-5, **fsC) +except AttributeError: + ax2.hist(r, 5, normed=True, zorder=-10, **fsB) + ax2.hist(r, 20, normed=True, zorder=-5, **fsC) fig.savefig('pdfhistogram.pdf') From d1c6174ae2f0298b6b105e29b0042a651cd2f121 Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Tue, 27 Oct 2020 23:28:30 +0100 Subject: [PATCH 2/3] [statistics] plots work for old and new matplotlib --- plotstyle.py | 31 +++++++++++++-------- statistics/lecture/diehistograms.py | 5 ++-- statistics/lecture/displayunivariatedata.py | 28 +++++++++++-------- statistics/lecture/kerneldensity.py | 25 ++++++++--------- statistics/lecture/pdfhistogram.py | 6 ++-- statistics/lecture/pdfprobabilities.py | 2 +- 6 files changed, 55 insertions(+), 42 deletions(-) diff --git a/plotstyle.py b/plotstyle.py index 7c85d36..729962d 100644 --- a/plotstyle.py +++ b/plotstyle.py @@ -2,8 +2,12 @@ import matplotlib as mpl import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D +# Set to true if you want xkcd-type sketchy plots: xkcd_style = True +# matplotlib major version: +mpl_major = int(mpl.__version__.split('.')[0]) + # default size of figure: figure_width = 15.0 # cm, should be set according to \textwidth in the latex document figure_height = 6.0 # cm, for a 1 x 2 figure @@ -26,7 +30,7 @@ colors['white'] = '#FFFFFF' #colors_bendalab_vivid['green'] = '#30D700' #colors_bendalab_vivid['blue'] = '#0020C0' -# line styles for plot(): +# general settings for plot styles: lwthick = 3.0 lwthin = 1.8 mainline = {'linestyle': '-', 'linewidth': lwthick} @@ -35,9 +39,12 @@ largemarker = {'marker': 'o', 'markersize': 9, 'markeredgecolor': colors['white' smallmarker = {'marker': 'o', 'markersize': 6, 'markeredgecolor': colors['white'], 'markeredgewidth': 1} largelinepoints = {'linestyle': '-', 'linewidth': lwthick, 'marker': 'o', 'markersize': 10, 'markeredgecolor': colors['white'], 'markeredgewidth': 1} smalllinepoints = {'linestyle': '-', 'linewidth': 1.4, 'marker': 'o', 'markersize': 7, 'markeredgecolor': colors['white'], 'markeredgewidth': 1} -filllw = 1 +filllw = 1.0 fillec = colors['white'] fillalpha = 0.4 +filledge = {'linewidth': filllw, 'joinstyle': 'round'} +if int(mpl.__version__.split('.')[0]) < 2: + del filledge['joinstyle'] # helper lines: lsSpine = {'c': colors['black'], 'linestyle': '-', 'linewidth': 1, 'clip_on': False} @@ -71,7 +78,7 @@ psA = dict({'color': colors['blue'], 'linestyle': 'none'}, **largemarker) psAm = dict({'color': colors['blue'], 'linestyle': 'none'}, **smallmarker) lpsA = dict({'color': colors['blue']}, **largelinepoints) lpsAm = dict({'color': colors['blue']}, **smalllinepoints) -fsA = {'facecolor': colors['blue'], 'edgecolor': fillec, 'linewidth': filllw} +fsA = dict({'facecolor': colors['blue'], 'edgecolor': fillec}, **filledge) fsAs = {'facecolor': colors['blue'], 'edgecolor': 'none'} fsAa = {'facecolor': colors['blue'], 'edgecolor': 'none', 'alpha': fillalpha} @@ -81,7 +88,7 @@ psB = dict({'color': colors['red'], 'linestyle': 'none'}, **largemarker) psBm = dict({'color': colors['red'], 'linestyle': 'none'}, **smallmarker) lpsB = dict({'color': colors['red']}, **largelinepoints) lpsBm = dict({'color': colors['red']}, **smalllinepoints) -fsB = {'facecolor': colors['red'], 'edgecolor': fillec, 'linewidth': filllw} +fsB = dict({'facecolor': colors['red'], 'edgecolor': fillec}, **filledge) fsBs = {'facecolor': colors['red'], 'edgecolor': 'none'} fsBa = {'facecolor': colors['red'], 'edgecolor': 'none', 'alpha': fillalpha} @@ -89,7 +96,7 @@ lsC = dict({'color': colors['lightorange']}, **mainline) lsCm = dict({'color': colors['lightorange']}, **minorline) psC = dict({'color': colors['lightorange'], 'linestyle': 'none'}, **largemarker) psCm = dict({'color': colors['lightorange'], 'linestyle': 'none'}, **smallmarker) -fsC = {'facecolor': colors['lightorange'], 'edgecolor': fillec, 'linewidth': filllw} +fsC = dict({'facecolor': colors['lightorange'], 'edgecolor': fillec}, **filledge) fsCs = {'facecolor': colors['lightorange'], 'edgecolor': 'none'} fsCa = {'facecolor': colors['lightorange'], 'edgecolor': 'none', 'alpha': fillalpha} @@ -97,17 +104,17 @@ lsD = dict({'color': colors['orange']}, **mainline) lsDm = dict({'color': colors['orange']}, **minorline) psD = dict({'color': colors['orange'], 'linestyle': 'none'}, **largemarker) psDm = dict({'color': colors['orange'], 'linestyle': 'none'}, **smallmarker) -fsD = {'facecolor': colors['orange'], 'edgecolor': fillec, 'linewidth': filllw} +fsD = dict({'facecolor': colors['orange'], 'edgecolor': fillec}, **filledge) fsDs = {'facecolor': colors['orange'], 'edgecolor': 'none'} lsE = dict({'color': colors['yellow']}, **mainline) lsEm = dict({'color': colors['yellow']}, **minorline) psE = dict({'color': colors['yellow'], 'linestyle': 'none'}, **largemarker) psEm = dict({'color': colors['yellow'], 'linestyle': 'none'}, **smallmarker) -fsE = {'facecolor': colors['yellow'], 'edgecolor': fillec, 'linewidth': filllw} +fsE = dict({'facecolor': colors['yellow'], 'edgecolor': fillec}, **filledge) fsEs = {'facecolor': colors['yellow'], 'edgecolor': 'none'} -fsF = {'facecolor': colors['green'], 'edgecolor': fillec, 'linewidth': filllw} +fsF = dict({'facecolor': colors['green'], 'edgecolor': fillec}, **filledge) fsFs = {'facecolor': colors['green'], 'edgecolor': 'none'} # factor for scaling widths of bars in a bar plot: @@ -326,7 +333,7 @@ def set_zlabel(ax, label, unit=None, **kwargs): ax.set_zlabel_orig(axis_label(label, unit), **kwargs) -def common_format(): +def common_style(): """ Set some rc parameter. """ mpl.rcParams['figure.figsize'] = cm_size(figure_width, figure_height) @@ -337,6 +344,8 @@ def common_format(): mpl.rcParams['figure.subplot.wspace'] = 0.4 mpl.rcParams['figure.subplot.hspace'] = 0.6 mpl.rcParams['figure.facecolor'] = 'white' + mpl.rcParams['figure.edgecolor'] = 'none' + mpl.rcParams['figure.frameon'] = False mpl.rcParams['xtick.direction'] = 'out' mpl.rcParams['ytick.direction'] = 'out' mpl.rcParams['xtick.major.width'] = 1.25 @@ -380,7 +389,7 @@ def sketch_style(): global bar_fac bar_fac = 0.9 plt.xkcd() - common_format() + common_style() mpl.rcParams['legend.fontsize'] = 'medium' mpl.rcParams['xtick.labelsize'] = 'medium' mpl.rcParams['ytick.labelsize'] = 'medium' @@ -394,7 +403,7 @@ def plain_style(): global bar_fac bar_fac = 1.0 plt.rcdefaults() - common_format() + common_style() mpl.rcParams['font.family'] = 'sans-serif' mpl.rcParams['legend.fontsize'] = 'x-small' mpl.rcParams['xtick.labelsize'] = 'small' diff --git a/statistics/lecture/diehistograms.py b/statistics/lecture/diehistograms.py index c5d03fb..2458412 100644 --- a/statistics/lecture/diehistograms.py +++ b/statistics/lecture/diehistograms.py @@ -2,7 +2,6 @@ import numpy as np import matplotlib.pyplot as plt from plotstyle import * -sketch_style() # roll the die: rng = np.random.RandomState(57281) x1 = rng.randint(1, 7, 100) @@ -27,9 +26,9 @@ ax2.set_xlabel('x') ax2.set_ylim(0, 0.23) ax2.set_ylabel('Probability') ax2.plot([0.2, 6.8], [1.0/6.0, 1.0/6.0], zorder=-10, **lsAm) -try: +if mpl_major > 1: ax2.hist([x2, x1], bins, density=True, zorder=-5, **fs) -except AttributeError: +else: ax2.hist([x2, x1], bins, normed=True, zorder=-5, **fs) fig.subplots_adjust(left=0.125) fig.savefig('diehistograms.pdf') diff --git a/statistics/lecture/displayunivariatedata.py b/statistics/lecture/displayunivariatedata.py index f56906a..64604c0 100644 --- a/statistics/lecture/displayunivariatedata.py +++ b/statistics/lecture/displayunivariatedata.py @@ -4,7 +4,6 @@ import matplotlib.gridspec as gridspec from scipy.stats import gaussian_kde from plotstyle import * -#sketch_style() #rng = np.random.RandomState(981) #data = rng.randn(40, 1) + 4.0 rng = np.random.RandomState(1981) @@ -19,9 +18,11 @@ fig = plt.figure(figsize=cm_size(figure_width, 1.1*figure_height)) spec = gridspec.GridSpec(nrows=1, ncols=2, width_ratios=[3, 1], wspace=0.1, **adjust_fs(fig, left=4.0)) -ax = fig.add_subplot(spec[0, 0]) +ax = fig.add_subplot(spec[0, 0], label='1') wh = ax.boxplot( data, positions=[boxpos], widths=[barwidth], whis=100.0, patch_artist=True) +mediancolor = 'k' wh['medians'][0].set_linewidth(4) +wh['medians'][0].set_color(mediancolor) wh['whiskers'][0].set_linewidth(2) wh['whiskers'][1].set_linewidth(2) wh['whiskers'][0].set_linestyle('-') @@ -34,6 +35,16 @@ wh['caps'][1].set_color(whiskercolor) wh['boxes'][0].set_facecolor('#99ff00') ax.set_xlim(0.0, 4.8) ax.set_ylim( 0.0, 8.0) +ax.set_xticklabels([]) + +ax = fig.add_subplot(spec[0, 0], label='2') +ax.set_xlim(0.0, 4.8) +ax.set_xticks([scatterpos, barpos, boxpos]) +ax.set_xticklabels(['(1) data', '(2) bar\n plot', '(3) box-\nwhisker'], fontsize='medium') +ax.set_ylabel('x') +ax.set_ylim( 0.0, 8.0) + +# annotate box whisker: ax.annotate('maximum', xy=(boxpos, 6.5), xycoords='data', xytext=(boxpos-1*barwidth, 7.6), textcoords='data', ha='left', @@ -49,14 +60,6 @@ ax.annotate('median', xytext=(boxpos+0.1*barwidth, 4.2), textcoords='data', ha='left', arrowprops=dict(arrowstyle="->", relpos=(0.8,0.0), connectionstyle="angle3,angleA=-60,angleB=20") ) -ax.set_xticklabels([]) - -ax = fig.add_subplot(spec[0, 0]) -ax.set_xlim(0.0, 4.8) -ax.set_xticks([scatterpos, barpos, boxpos]) -ax.set_xticklabels(['(1) data', '(2) bar\n plot', '(3) box-\nwhisker'], fontsize='medium') -ax.set_ylabel('x') -ax.set_ylim( 0.0, 8.0) # scatter data points according to their density: kernel = gaussian_kde(data) @@ -67,7 +70,10 @@ ax.plot(scatterpos+barwidth*x*(rng.rand(len(data))-0.5), data, **psA) barmean = np.mean(data) barstd = np.std(data) ew = 0.2 -ax.bar([barpos-0.5*barwidth], [barmean], barwidth, **fsC) +if mpl_major > 1: + ax.bar([barpos], [barmean], barwidth, **fsC) +else: + ax.bar([barpos-0.5*barwidth], [barmean], barwidth, **fsC) ax.plot([barpos, barpos], [barmean-barstd, barmean+barstd], **lsMarker) ax.plot([barpos-0.5*ew, barpos+0.5*ew], [barmean-barstd, barmean-barstd], **lsMarker) ax.plot([barpos-0.5*ew, barpos+0.5*ew], [barmean+barstd, barmean+barstd], **lsMarker) diff --git a/statistics/lecture/kerneldensity.py b/statistics/lecture/kerneldensity.py index 2a0cbb7..503ac46 100644 --- a/statistics/lecture/kerneldensity.py +++ b/statistics/lecture/kerneldensity.py @@ -1,6 +1,7 @@ import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec +import matplotlib.ticker as ticker from plotstyle import * # normal distribution: @@ -37,41 +38,39 @@ spec = gridspec.GridSpec(nrows=2, ncols=2, wspace=0.35, hspace=0.3, **adjust_fs(fig, left=5.5, top=0.2, bottom=2.7)) ax = fig.add_subplot(spec[0, 0]) -ax.set_xlabel('x') ax.set_xlim(-3.2, 3.2) -ax.set_xticks(np.arange(-3.0, 3.1, 1.0)) +ax.xaxis.set_major_locator(ticker.MultipleLocator(1.0)) +ax.xaxis.set_major_formatter(ticker.NullFormatter()) ax.set_ylabel('p(x)') ax.set_ylim(0.0, 0.49) -ax.set_yticks(np.arange(0.0, 0.41, 0.1)) -#ax.plot(x, g, '-b', lw=2, zorder=-1) -try: +ax.yaxis.set_major_locator(ticker.MultipleLocator(0.2)) +if mpl_major > 1: ax.hist(r, np.arange(-4.1, 4, 0.4), density=True, zorder=-5, **fsC) -except AttributeError: +else: ax.hist(r, np.arange(-4.1, 4, 0.4), normed=True, zorder=-5, **fsC) ax = fig.add_subplot(spec[1, 0]) ax.set_xlabel('x') ax.set_xlim(-3.2, 3.2) -ax.set_xticks(np.arange(-3.0, 3.1, 1.0)) +ax.xaxis.set_major_locator(ticker.MultipleLocator(1.0)) ax.set_ylabel('p(x)') ax.set_ylim(0.0, 0.49) -ax.set_yticks(np.arange(0.0, 0.41, 0.1)) -#ax.plot(x, g, '-b', lw=2, zorder=-1) -try: +ax.yaxis.set_major_locator(ticker.MultipleLocator(0.2)) +if mpl_major > 1: ax.hist(r, np.arange(-4.3, 4, 0.4), density=True, zorder=-5, **fsC) -except AttributeError: +else: ax.hist(r, np.arange(-4.3, 4, 0.4), normed=True, zorder=-5, **fsC) ax = fig.add_subplot(spec[:, 1]) ax.set_xlabel('x') ax.set_xlim(-3.2, 3.2) -ax.set_xticks(np.arange(-3.0, 3.1, 1.0)) +ax.xaxis.set_major_locator(ticker.MultipleLocator(1.0)) ax.set_ylabel('Prob. density p(x)') ax.set_ylim(0.0, 0.49) ax.set_yticks(np.arange(0.0, 0.41, 0.1)) kd, xx = kerneldensity(r, -3.2, 3.2, 0.2) ax.fill_between(xx, 0.0, kd, zorder=-5, **fsDs) ax.plot(xx, kd, '-', zorder=-1, **lsB) -fig.subplots_adjust(left=0.15) + fig.savefig('kerneldensity.pdf') diff --git a/statistics/lecture/pdfhistogram.py b/statistics/lecture/pdfhistogram.py index cddffa6..33e6cf4 100644 --- a/statistics/lecture/pdfhistogram.py +++ b/statistics/lecture/pdfhistogram.py @@ -8,7 +8,7 @@ x = np.arange(-4.0, 4.0, 0.01) g = np.exp(-0.5*x*x)/np.sqrt(2.0*np.pi) r = rng.randn(100) -fig, (ax1, ax2) = plt.subplots(1, 2) +fig, (ax1, ax2) = plt.subplots(1, 2, figsize=cm_size(figure_width, 1.1*figure_height)) ax1.set_xlabel('x') ax1.set_xlim(-3.2, 3.2) ax1.set_xticks(np.arange(-3.0, 3.1, 1.0)) @@ -24,10 +24,10 @@ ax2.set_ylabel('Probab. density p(x)') ax2.set_ylim(0.0, 0.44) ax2.set_yticks(np.arange(0.0, 0.41, 0.1)) ax2.plot(x, g, zorder=-1, **lsA) -try: +if mpl_major > 1: ax2.hist(r, 5, density=True, zorder=-10, **fsB) ax2.hist(r, 20, density=True, zorder=-5, **fsC) -except AttributeError: +else: ax2.hist(r, 5, normed=True, zorder=-10, **fsB) ax2.hist(r, 20, normed=True, zorder=-5, **fsC) diff --git a/statistics/lecture/pdfprobabilities.py b/statistics/lecture/pdfprobabilities.py index 3e9e3c6..87928e3 100644 --- a/statistics/lecture/pdfprobabilities.py +++ b/statistics/lecture/pdfprobabilities.py @@ -10,7 +10,7 @@ x2=1.0 fig, ax = plt.subplots(figsize=cm_size(figure_width, 1.2*figure_height)) ax.set_xlabel('x') -ax.set_ylabel('Probability density p(x)') +ax.set_ylabel('Prob. density p(x)') ax.set_ylim(0.0, 0.46) ax.set_yticks(np.arange(0.0, 0.45, 0.1)) ax.annotate('Gaussian', From 2a4c7ff03859e788dfb79945104a3ddfa9cef0db Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Tue, 27 Oct 2020 23:59:14 +0100 Subject: [PATCH 3/3] [all data analysis] plots work for old and new matplotlib --- bootstrap/lecture/bootstrapsem.py | 2 +- bootstrap/lecture/permutecorrelation.py | 8 +- likelihood/lecture/mlemean.py | 8 +- likelihood/lecture/mlepdf.py | 4 +- likelihood/lecture/mlepropline.py | 4 +- plotstyle.py | 2 +- pointprocesses/lecture/firingrates.py | 8 +- pointprocesses/lecture/isimethod.py | 6 +- .../lecture/pointprocessscetchA.eps | 105 +++---- .../lecture/pointprocessscetchA.pdf | Bin 2791 -> 2786 bytes .../lecture/pointprocessscetchB.eps | 260 ++++++------------ .../lecture/pointprocessscetchB.pdf | Bin 4724 -> 4694 bytes regression/lecture/gradient.py | 8 +- 13 files changed, 145 insertions(+), 270 deletions(-) diff --git a/bootstrap/lecture/bootstrapsem.py b/bootstrap/lecture/bootstrapsem.py index d8b0346..3a276bd 100644 --- a/bootstrap/lecture/bootstrapsem.py +++ b/bootstrap/lecture/bootstrapsem.py @@ -38,7 +38,7 @@ ax.annotate('sampling\ndistribution', connectionstyle="angle3,angleA=20,angleB=120") ) ax.annotate('bootstrap\ndistribution', xy=(0.13, 3.3), xycoords='data', - xytext=(0.25, 4), textcoords='data', + xytext=(0.22, 4), textcoords='data', arrowprops=dict(arrowstyle="->", relpos=(0.0,0.5), connectionstyle="angle3,angleA=20,angleB=60") ) ax.bar(bins[:-1]-0.25*db, hmusrs, 0.5*db, **fsB) diff --git a/bootstrap/lecture/permutecorrelation.py b/bootstrap/lecture/permutecorrelation.py index 2f10af8..c5f0db7 100644 --- a/bootstrap/lecture/permutecorrelation.py +++ b/bootstrap/lecture/permutecorrelation.py @@ -44,19 +44,19 @@ ax.annotate('Measured\ncorrelation\nis significant!', connectionstyle="angle3,angleA=10,angleB=80") ) ax.annotate('95% percentile', xy=(0.14, 0.9), xycoords='data', - xytext=(0.2, 4.0), textcoords='data', ha='left', + xytext=(0.18, 4.0), textcoords='data', ha='left', arrowprops=dict(arrowstyle="->", relpos=(0.1,0.0), - connectionstyle="angle3,angleA=30,angleB=70") ) + connectionstyle="angle3,angleA=30,angleB=80") ) ax.annotate('Distribution of\nuncorrelated\nsamples', xy=(-0.08, 3.6), xycoords='data', xytext=(-0.22, 5.0), textcoords='data', ha='left', arrowprops=dict(arrowstyle="->", relpos=(0.5,0.0), - connectionstyle="angle3,angleA=150,angleB=100") ) + connectionstyle="angle3,angleA=150,angleB=110") ) ax.bar(b[:-1], h, width=b[1]-b[0], **fsC) ax.bar(b[:-1][b[:-1]>=rq], h[b[:-1]>=rq], width=b[1]-b[0], **fsB) ax.plot( [rd, rd], [0, 1], **lsA) ax.set_xlim(-0.25, 0.35) ax.set_xlabel('Correlation coefficient') -ax.set_ylabel('Probability density of H0') +ax.set_ylabel('Prob. density of H0') plt.savefig('permutecorrelation.pdf') diff --git a/likelihood/lecture/mlemean.py b/likelihood/lecture/mlemean.py index 83b1bab..a1fb974 100644 --- a/likelihood/lecture/mlemean.py +++ b/likelihood/lecture/mlemean.py @@ -26,7 +26,7 @@ ax.set_ylim(-0.02, 0.85) ax.set_xticks(np.arange(0, 5)) ax.set_yticks(np.arange(0, 0.9, 0.2)) ax.set_xlabel('x') -ax.set_ylabel('Probability density') +ax.set_ylabel('Prob. density') s = 1 for mu in mus : r = 5.0*rng.rand()+2.0 @@ -35,11 +35,11 @@ for mu in mus : ax.annotate('', xy=(mu, 0.02), xycoords='data', xytext=(mu, 0.75), textcoords='data', arrowprops=dict(arrowstyle="->", relpos=(0.5,0.5), - connectionstyle=cs), zorder=1) + connectionstyle=cs), zorder=10) if mu > rmu : - ax.text(mu-0.1, 0.04, '?', zorder=1, ha='right') + ax.text(mu-0.1, 0.04, '?', zorder=10, ha='right') else : - ax.text(mu+0.1, 0.04, '?', zorder=1) + ax.text(mu+0.1, 0.04, '?', zorder=10) for k, ls in enumerate([lsCm, lsBm, lsDm]) : ax.plot(x, g[:,k], zorder=5, **ls) ax.plot(xd, 0.05*rng.rand(len(xd))+0.2, zorder=10, **psAm) diff --git a/likelihood/lecture/mlepdf.py b/likelihood/lecture/mlepdf.py index ddbcb57..3b1a851 100644 --- a/likelihood/lecture/mlepdf.py +++ b/likelihood/lecture/mlepdf.py @@ -29,7 +29,7 @@ ax1.set_ylim(0.0, 0.42) ax1.set_xticks(np.arange(0, 11, 2)) ax1.set_yticks(np.arange(0, 0.42, 0.1)) ax1.set_xlabel('x') -ax1.set_ylabel('Probability density') +ax1.set_ylabel('Prob. density') ax1.plot(xx, yy, label='pdf', **lsB) ax1.plot(xx, yf, label='mle', **lsCm) kernel = st.gaussian_kde(xd) @@ -54,7 +54,7 @@ ax2.set_xticks(np.arange(0, 11, 2)) ax2.set_xlabel('x') ax2.set_ylim(0.0, 0.42) ax2.set_yticks(np.arange(0, 0.42, 0.1)) -ax2.set_ylabel('Probability density') +ax2.set_ylabel('Prob. density') ax2.plot(xx, yy, label='pdf', **lsB) ax2.plot(xx, yc, label='fit', **lsCm) ax2.bar(b[:-1], h, np.diff(b), **fsA) diff --git a/likelihood/lecture/mlepropline.py b/likelihood/lecture/mlepropline.py index 906a3f2..cecd350 100644 --- a/likelihood/lecture/mlepropline.py +++ b/likelihood/lecture/mlepropline.py @@ -6,7 +6,7 @@ from plotstyle import * fig = plt.figure() spec = gridspec.GridSpec(nrows=1, ncols=2, wspace=0.3, - **adjust_fs(fig, left=5.5)) + **adjust_fs(fig, left=5.5, top=1)) spec1 = gridspec.GridSpecFromSubplotSpec(1, 2, spec[0, 0], width_ratios=[3, 1], wspace=0.0) spec2 = gridspec.GridSpecFromSubplotSpec(1, 2, spec[0, 1], width_ratios=[3, 1], wspace=0.0) @@ -34,7 +34,7 @@ ax.set_ylabel('y') ax.plot(x, y, label='data', zorder=10, **psAm) ax.plot(xx, yy, label='original', zorder=5, **lsB) ax.plot(xx, yf, label='fit', zorder=7, **lsCm) -ax.legend(loc='upper left', bbox_to_anchor=(0.0, 1.15)) +ax.legend(loc='upper left', bbox_to_anchor=(-0.05, 1.2)) ax = fig.add_subplot(spec1[0, 1]) ax.show_spines('l') diff --git a/plotstyle.py b/plotstyle.py index 729962d..7e3ba8c 100644 --- a/plotstyle.py +++ b/plotstyle.py @@ -277,7 +277,7 @@ def axis_label(label, unit=None): if not unit: return label elif xkcd_style: - return '%s / %s' % (label, unit) + return '%s/%s' % (label, unit) else: return '%s [%s]' % (label, unit) diff --git a/pointprocesses/lecture/firingrates.py b/pointprocesses/lecture/firingrates.py index b7029fa..087e7ee 100644 --- a/pointprocesses/lecture/firingrates.py +++ b/pointprocesses/lecture/firingrates.py @@ -149,7 +149,7 @@ def plot_comparison(spike_times, bin_width, sigma, max_t=30., dt=1e-4): ax1.show_spines('b') ax1.vlines(times[times < (100000*dt)], ymin=0, ymax=1, color=colors['blue'], lw=1.5) #ax1.set_ylabel('Spikes') - ax1.text(-0.105, 0.5, 'Spikes', transform=ax1.transAxes, + ax1.text(-0.13, 0.5, 'Spikes', transform=ax1.transAxes, rotation='vertical', va='center') ax1.set_xlim(2.5, 3.5) ax1.set_ylim(-0.2, 1) @@ -159,7 +159,7 @@ def plot_comparison(spike_times, bin_width, sigma, max_t=30., dt=1e-4): ax2.plot(time, inst_rate, color=colors['orange'], lw=2) ax2.text(1.0, 1.0, 'instantaneous rate', transform=ax2.transAxes, ha='right') #ax2.set_ylabel('Rate', 'Hz') - ax2.text(-0.105, 0.5, axis_label('Rate', 'Hz'), transform=ax2.transAxes, + ax2.text(-0.13, 0.5, axis_label('Rate', 'Hz'), transform=ax2.transAxes, rotation='vertical', va='center') ax2.set_xlim(2.5, 3.5) ax2.set_ylim(0, 300) @@ -170,7 +170,7 @@ def plot_comparison(spike_times, bin_width, sigma, max_t=30., dt=1e-4): ax3.plot(time, binn_rate, color=colors['orange'], lw=2) ax3.text(1.0, 1.0, 'binned rate', transform=ax3.transAxes, ha='right') #ax3.set_ylabel('Rate', 'Hz') - ax3.text(-0.105, 0.5, axis_label('Rate', 'Hz'), transform=ax3.transAxes, + ax3.text(-0.13, 0.5, axis_label('Rate', 'Hz'), transform=ax3.transAxes, rotation='vertical', va='center') ax3.set_xlim(2.5, 3.5) ax3.set_ylim(0, 300) @@ -182,7 +182,7 @@ def plot_comparison(spike_times, bin_width, sigma, max_t=30., dt=1e-4): ax4.text(1.0, 1.0, 'convolved rate', transform=ax4.transAxes, ha='right') ax4.set_xlabel('Time', 's') #ax4.set_ylabel('Rate', 'Hz') - ax4.text(-0.105, 0.5, axis_label('Rate', 'Hz'), transform=ax4.transAxes, + ax4.text(-0.13, 0.5, axis_label('Rate', 'Hz'), transform=ax4.transAxes, rotation='vertical', va='center') ax4.set_xlim(2.5, 3.5) ax4.set_xticks([2.5, 2.75, 3.0, 3.25, 3.5]) diff --git a/pointprocesses/lecture/isimethod.py b/pointprocesses/lecture/isimethod.py index 750b840..ef28b8f 100644 --- a/pointprocesses/lecture/isimethod.py +++ b/pointprocesses/lecture/isimethod.py @@ -31,7 +31,7 @@ def setup_axis(spikes_ax, rate_ax): spikes_ax.show_spines('') spikes_ax.set_yticks([]) spikes_ax.set_ylim(-0.2, 1.0) - spikes_ax.text(-0.1, 0.5, 'Spikes', transform=spikes_ax.transAxes, rotation='vertical', va='center') + spikes_ax.text(-0.11, 0.5, 'Spikes', transform=spikes_ax.transAxes, rotation='vertical', va='center') spikes_ax.set_xlim(-1, 500) spikes_ax.set_xticklabels([]) #spikes_ax.set_xticklabels(np.arange(0., 600, 100)) @@ -39,7 +39,7 @@ def setup_axis(spikes_ax, rate_ax): spikes_ax.show_spines('lb') rate_ax.set_xlabel('Time', 'ms') #rate_ax.set_ylabel('Firing rate', 'Hz') - rate_ax.text(-0.1, 0.5, axis_label('Rate', 'Hz'), transform=rate_ax.transAxes, + rate_ax.text(-0.11, 0.5, axis_label('Rate', 'Hz'), transform=rate_ax.transAxes, rotation='vertical', va='center') rate_ax.set_xlim(0, 500) #rate_ax.set_xticklabels(np.arange(0., 600, 100)) @@ -126,7 +126,7 @@ def plot_isi_method(): t_start = 1000*spike_times[i-1] t = 1000*spike_times[i] spikes_ax.plot([t_start, t_start], [0., 1.], color=colors['blue'], lw=2) - spikes_ax.annotate(s='', xy=(t_start, 0.5), xytext=(t,0.5), arrowprops=dict(arrowstyle='<->'), color=colors['red']) + spikes_ax.annotate('', xy=(t_start, 0.5), xytext=(t,0.5), arrowprops=dict(arrowstyle='<->'), color=colors['red']) spikes_ax.text(0.5*(t_start+t), 1.05, "{0:.0f}".format((t - t_start)), color=colors['red'], ha='center') diff --git a/pointprocesses/lecture/pointprocessscetchA.eps b/pointprocesses/lecture/pointprocessscetchA.eps index 2c18dd1..2383569 100644 --- a/pointprocesses/lecture/pointprocessscetchA.eps +++ b/pointprocesses/lecture/pointprocessscetchA.eps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: pointprocessscetchA.tex -%%Creator: gnuplot 5.0 patchlevel 5 -%%CreationDate: Tue Jan 7 10:05:37 2020 +%%Creator: gnuplot 4.6 patchlevel 4 +%%CreationDate: Tue Oct 27 23:58:04 2020 %%DocumentFonts: %%BoundingBox: 50 50 373 135 %%EndComments @@ -18,7 +18,6 @@ gnudict begin /Dashlength 1 def /Landscape false def /Level1 false def -/Level3 false def /Rounded true def /ClipToBoundingBox false def /SuppressPDFMark false def @@ -30,11 +29,11 @@ gnudict begin % /vshift -73 def /dl1 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if } def /dl2 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul add } if } def /hpt_ 31.5 def @@ -48,7 +47,7 @@ gnudict begin } if } def % -% Gnuplot Prolog Version 5.1 (Oct 2015) +% Gnuplot Prolog Version 4.6 (September 2012) % %/SuppressPDFMark true def % @@ -65,11 +64,11 @@ gnudict begin /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} @@ -83,7 +82,7 @@ gnudict begin /PL {stroke userlinewidth setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def 3.8 setmiterlimit -% Classic Line colors (version 5.0) +% Default Line colors /LCw {1 1 1} def /LCb {0 0 0} def /LCa {0 0 0} def @@ -96,21 +95,19 @@ gnudict begin /LC6 {0 0 0} def /LC7 {1 0.3 0} def /LC8 {0.5 0.5 0.5} def -% Default dash patterns (version 5.0) -/LTB {BL [] LCb DL} def +% Default Line Types /LTw {PL [] 1 setgray} def -/LTb {PL [] LCb DL} def +/LTb {BL [] LCb DL} def /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def /LT0 {PL [] LC0 DL} def -/LT1 {PL [2 dl1 3 dl2] LC1 DL} def -/LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def -/LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def -/LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def -/LT5 {PL [4 dl1 2 dl2] LC5 DL} def -/LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def -/LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def -/LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def -/SL {[] 0 setdash} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def /Dia {stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V @@ -332,14 +329,9 @@ gnudict begin % /languagelevel where {pop languagelevel} {1} ifelse -dup 2 lt - {/InterpretLevel1 true def - /InterpretLevel3 false def} - {/InterpretLevel1 Level1 def - 2 gt - {/InterpretLevel3 Level3 def} - {/InterpretLevel3 false def} - ifelse } + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} ifelse % % PostScript level 2 pattern fill definitions @@ -428,7 +420,6 @@ Level1 {Level1PatternFill} {Level2PatternFill} ifelse /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall currentdict end definefont pop -% Level1 SuppressPDFMark or {} { /SDict 10 dict def @@ -438,42 +429,14 @@ systemdict /pdfmark known not { SDict begin [ /Title (pointprocessscetchA.tex) /Subject (gnuplot plot) - /Creator (gnuplot 5.0 patchlevel 5) - /Author (benda) + /Creator (gnuplot 4.6 patchlevel 4) + /Author (jan) % /Producer (gnuplot) % /Keywords () - /CreationDate (Tue Jan 7 10:05:37 2020) + /CreationDate (Tue Oct 27 23:58:04 2020) /DOCINFO pdfmark end } ifelse -% -% Support for boxed text - Ethan A Merritt May 2005 -% -/InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put - userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put - /Boxing true def } def -/ExtendTextBox { Boxing - { gsave dup false charpath pathbbox - dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse - dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse - dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse - dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse - grestore } if } def -/PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M - TBx1 TBxmargin sub TBy2 TBymargin add L - TBx2 TBxmargin add TBy2 TBymargin add L - TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def -/DrawTextBox { PopTextBox stroke /Boxing false def} def -/FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def -0 0 0 0 InitTextBox -/TBxmargin 20 def -/TBymargin 20 def -/Boxing false def -/textshow { ExtendTextBox Gshow } def -% -% redundant definitions for compatibility with prologue.ps older than 5.0.2 -/LTB {BL [] LCb DL} def -/LTb {PL [] LCb DL} def end %%EndProlog %%Page: 1 1 @@ -487,9 +450,10 @@ newpath 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 1.000 UP +LTb LCb setrgbcolor +LTb 1.000 UL LTb gsave 6208 824 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill @@ -503,11 +467,9 @@ gsave 6208 824 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill stroke 2.000 UL LTb -0.00 0.00 0.00 C % Begin plot #1 -10.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +0.00 0.00 0.00 C 10.000 UL +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 573 M 0 503 V 1412 573 M @@ -526,16 +488,11 @@ LCb setrgbcolor 0 503 V 5685 573 M 0 503 V +1.000 UP stroke -LTw -% End plot #1 2.000 UL LTb LCb setrgbcolor -[] 0 setdash -1.000 UP -2.000 UL -LTb 0.00 0.00 0.00 C stroke grestore end diff --git a/pointprocesses/lecture/pointprocessscetchA.pdf b/pointprocesses/lecture/pointprocessscetchA.pdf index 0d2f26e462a4016a4e9921b47de8cd85e74860e4..59b05836210d0388b698c5ca52f9fff0e76a8257 100644 GIT binary patch delta 810 zcmaDZ`bd;RHNeG9*HF)VB8Nl0BNvk)kL!0!SHFPUOHN)9=4j$RuFS!A;*3*lMeTB5 ziPvFXFaQ5n-Ot~nn7HQn{nt#p3lF?x)jj&0WlqwuIUM4X_k_<0Uuo%aI$eI@rjyg| zIeg%i;hLxLuyAjAzAXR$?UVk!iL78;Ri7%jWKs6vOIr$JXcQV;ADkmG7o12*@>Y5rPo9G%ErkUv)0D-Q7X`-=lN>YkJs=49hSIj<)W|QUF z)QD2uz~aDXXrOCk9%5u{Wolt%U^@96i>|PLvTlh&h>^LKf{_(i+{$D!AFGaliJqB4 zL1IaAMowy3YL0@*WG_~CqU_ni>Oqt`V%?p=c7{1CF>kXadq1O#nI@OMb5UwyNoIbY zOJYf?Mo4L@f`4*}f|0ob)LSMBMg~R(Ky|+PDPScoRv-aG10!=IV^a&Dw|O|NFufPX zsR*)Wat)`Ut*HViuniRQ6u7_)10y2?GjuTn6D(pz=4O*$ajM&zW2iPYvcwcKH^3CL zw4Ch6WfSY>>TGV}Y~*YSG}6+=(9zk=)y3Jx)x^Tk+1%C4z}3!%po&;7J3Fr8lEk8t UilWpsE+Z3TV=h%ySARDy0FFcO{r~^~ delta 787 zcmaDP`dpMlHNeG9*HF)NB8Nl0H{T%x9+&TSt^NWz&o37+E%DOH=x=aQy`tB^dR@J9 ztA(8g6wQsl`(|sI zs!gd{c5O!g&h)I_qi?F0h0PTBJ~yqm@}-CAwC4(c`=U~fV;(RciU{YK_(7V{cry=U zH6xJfV6tOWPBKX`Of@mrHM2Ca)HO6rGu1T!0$l_1loVrwBp{JuF!?3352L|kIW{$- zRM)dO@EI5aO$aeGure^UGB%%lmPJ?CD^WL3Aw-opV7rYlS|*ZC^fMpGe6HI zu_RR^q%>8*D=|+&!CV36F$E(7Bak}Z{1mVf7b}o}fuVu9p@D%Z(Bqt(R+t_P=2V1O zG`XD9P}58S6yOF5c?w)$hJlfhfhD?_fr)|n|$hYXklh(YGPz$Y+-5PYHnvkP(>`4ogG(k YNn%k+MNw)RmywCF1(&L-tG^o;03ea@MgRZ+ diff --git a/pointprocesses/lecture/pointprocessscetchB.eps b/pointprocesses/lecture/pointprocessscetchB.eps index 83c9cea..d55c96f 100644 --- a/pointprocesses/lecture/pointprocessscetchB.eps +++ b/pointprocesses/lecture/pointprocessscetchB.eps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: pointprocessscetchB.tex -%%Creator: gnuplot 5.0 patchlevel 5 -%%CreationDate: Tue Jan 7 10:05:38 2020 +%%Creator: gnuplot 4.6 patchlevel 4 +%%CreationDate: Tue Oct 27 23:58:04 2020 %%DocumentFonts: %%BoundingBox: 50 50 373 237 %%EndComments @@ -18,7 +18,6 @@ gnudict begin /Dashlength 1 def /Landscape false def /Level1 false def -/Level3 false def /Rounded true def /ClipToBoundingBox false def /SuppressPDFMark false def @@ -30,11 +29,11 @@ gnudict begin % /vshift -73 def /dl1 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if } def /dl2 { - 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul add } if } def /hpt_ 31.5 def @@ -48,7 +47,7 @@ gnudict begin } if } def % -% Gnuplot Prolog Version 5.1 (Oct 2015) +% Gnuplot Prolog Version 4.6 (September 2012) % %/SuppressPDFMark true def % @@ -65,11 +64,11 @@ gnudict begin /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R - Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def + Blacktext {gsave 0 setgray show grestore} {show} ifelse} def /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} @@ -83,7 +82,7 @@ gnudict begin /PL {stroke userlinewidth setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def 3.8 setmiterlimit -% Classic Line colors (version 5.0) +% Default Line colors /LCw {1 1 1} def /LCb {0 0 0} def /LCa {0 0 0} def @@ -96,21 +95,19 @@ gnudict begin /LC6 {0 0 0} def /LC7 {1 0.3 0} def /LC8 {0.5 0.5 0.5} def -% Default dash patterns (version 5.0) -/LTB {BL [] LCb DL} def +% Default Line Types /LTw {PL [] 1 setgray} def -/LTb {PL [] LCb DL} def +/LTb {BL [] LCb DL} def /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def /LT0 {PL [] LC0 DL} def -/LT1 {PL [2 dl1 3 dl2] LC1 DL} def -/LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def -/LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def -/LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def -/LT5 {PL [4 dl1 2 dl2] LC5 DL} def -/LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def -/LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def -/LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def -/SL {[] 0 setdash} def +/LT1 {PL [4 dl1 2 dl2] LC1 DL} def +/LT2 {PL [2 dl1 3 dl2] LC2 DL} def +/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def +/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def +/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def +/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def /Dia {stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V @@ -332,14 +329,9 @@ gnudict begin % /languagelevel where {pop languagelevel} {1} ifelse -dup 2 lt - {/InterpretLevel1 true def - /InterpretLevel3 false def} - {/InterpretLevel1 Level1 def - 2 gt - {/InterpretLevel3 Level3 def} - {/InterpretLevel3 false def} - ifelse } + 2 lt + {/InterpretLevel1 true def} + {/InterpretLevel1 Level1 def} ifelse % % PostScript level 2 pattern fill definitions @@ -428,7 +420,6 @@ Level1 {Level1PatternFill} {Level2PatternFill} ifelse /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall currentdict end definefont pop -% Level1 SuppressPDFMark or {} { /SDict 10 dict def @@ -438,42 +429,14 @@ systemdict /pdfmark known not { SDict begin [ /Title (pointprocessscetchB.tex) /Subject (gnuplot plot) - /Creator (gnuplot 5.0 patchlevel 5) - /Author (benda) + /Creator (gnuplot 4.6 patchlevel 4) + /Author (jan) % /Producer (gnuplot) % /Keywords () - /CreationDate (Tue Jan 7 10:05:38 2020) + /CreationDate (Tue Oct 27 23:58:04 2020) /DOCINFO pdfmark end } ifelse -% -% Support for boxed text - Ethan A Merritt May 2005 -% -/InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put - userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put - /Boxing true def } def -/ExtendTextBox { Boxing - { gsave dup false charpath pathbbox - dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse - dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse - dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse - dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse - grestore } if } def -/PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M - TBx1 TBxmargin sub TBy2 TBymargin add L - TBx2 TBxmargin add TBy2 TBymargin add L - TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def -/DrawTextBox { PopTextBox stroke /Boxing false def} def -/FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def -0 0 0 0 InitTextBox -/TBxmargin 20 def -/TBymargin 20 def -/Boxing false def -/textshow { ExtendTextBox Gshow } def -% -% redundant definitions for compatibility with prologue.ps older than 5.0.2 -/LTB {BL [] LCb DL} def -/LTb {PL [] LCb DL} def end %%EndProlog %%Page: 1 1 @@ -487,9 +450,10 @@ newpath 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 1.000 UP +LTb LCb setrgbcolor +LTb 1.000 UL LTb gsave 6208 3165 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill @@ -503,11 +467,9 @@ gsave 6208 3165 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill stroke 2.000 UL LTb -0.00 0.00 0.00 C % Begin plot #1 -10.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +0.00 0.00 0.00 C 10.000 UL +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 3029 M 0 272 V 502 -272 R @@ -526,22 +488,18 @@ LCb setrgbcolor 0 272 V 5685 3029 M 0 272 V +1.000 UP stroke -LTw -% End plot #1 2.000 UL LTb LCb setrgbcolor -[] 0 setdash -1.000 UP -2.000 UL -LTb 0.00 0.00 0.00 C 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 1.000 UP +LTb LCb setrgbcolor +LTb 1.000 UL LTb gsave 6208 2043 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill @@ -552,86 +510,76 @@ gsave 6208 2043 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill 0 -32 V -5680 0 R 5680 0 V -stroke 1291 1929 M 121 32 V -121 32 V --260 0 R -910 1961 L -121 -32 V --121 32 R +-260 -64 R +-121 32 V +121 32 V +910 1961 M 502 0 V -stroke -2002 1929 M +590 -32 R 121 32 V -121 32 V --469 0 R --121 -32 V -121 -32 V --121 32 R +-469 -64 R +-121 32 V +121 32 V +-121 -32 R 711 0 V -stroke -2329 1939 M +206 -22 R 84 22 V -84 22 V --122 0 R --84 -22 V -84 -22 V --84 22 R +-122 -44 R +-84 22 V +84 22 V +-84 -22 R 290 0 V -stroke -2629 1938 M +216 -23 R 88 23 V -88 23 V --128 0 R --88 -23 V -88 -23 V --88 23 R +-128 -46 R +-88 23 V +88 23 V +-88 -23 R 304 0 V -stroke -3046 1929 M +329 -32 R 121 32 V -121 32 V --208 0 R --121 -32 V -121 -32 V --121 32 R +-208 -64 R +-121 32 V +121 32 V +-121 -32 R 450 0 V -stroke -3912 1929 M +745 -32 R 121 32 V -121 32 V --624 0 R --121 -32 V -121 -32 V --121 32 R +-624 -64 R +-121 32 V +121 32 V +-121 -32 R 866 0 V -stroke -4529 1929 M +496 -32 R 121 32 V -121 32 V --375 0 R --121 -32 V -121 -32 V --121 32 R +-375 -64 R +-121 32 V +121 32 V +-121 -32 R 617 0 V -stroke -5564 1929 M +914 -32 R 121 32 V -121 32 V --793 0 R --121 -32 V -121 -32 V --121 32 R +-793 -64 R +-121 32 V +121 32 V +-121 -32 R 1035 0 V stroke 2.000 UL LTb -0.00 0.00 0.00 C % Begin plot #1 -10.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +0.00 0.00 0.00 C 10.000 UL +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 1907 M 0 272 V 502 -272 R @@ -650,60 +598,47 @@ LCb setrgbcolor 0 272 V 5685 1907 M 0 272 V +1.000 UP stroke -LTw -% End plot #1 2.000 UL LTb LCb setrgbcolor -[] 0 setdash -1.000 UP -2.000 UL -LTb 0.00 0.00 0.00 C 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 268 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 460 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 652 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 844 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 1036 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 1228 M -63 0 V stroke LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 2.000 UL LTb LCb setrgbcolor -[] 0 setdash 0.00 0.00 0.00 C 528 1276 M 528 220 L 5801 0 R @@ -711,7 +646,9 @@ LCb setrgbcolor -5801 0 R 1.000 UP stroke +LTb LCb setrgbcolor +LTb 1.000 UL LTb gsave 6208 268 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill @@ -725,11 +662,9 @@ gsave 6208 268 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill stroke 2.000 UL LTb -0.00 0.00 0.00 C % Begin plot #1 -3.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +0.00 0.00 0.00 C 3.000 UL +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 528 268 M 382 0 V 0 96 R @@ -750,15 +685,11 @@ LCb setrgbcolor 1035 0 V 0 96 R 533 0 V -stroke -LTw -% End plot #1 -% Begin plot #2 1.500 UP +stroke 2.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 268 CircleF 1412 364 CircleF 2123 460 CircleF @@ -768,14 +699,10 @@ LCb setrgbcolor 4033 844 CircleF 4650 940 CircleF 5685 1036 CircleF -LTw -% End plot #2 -% Begin plot #3 1.000 UP 2.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +LT0 +LC0 setrgbcolor 1.00 1.00 1.00 C 910 268 CircleF 1412 364 CircleF 2123 460 CircleF @@ -785,14 +712,10 @@ LCb setrgbcolor 4033 844 CircleF 4650 940 CircleF 5685 1036 CircleF -LTw -% End plot #3 -% Begin plot #4 1.500 UP 2.000 UL -LTb -LCb setrgbcolor -[] 0 setdash +LT0 +LC0 setrgbcolor 0.00 0.00 0.00 C 910 364 CircleF 1412 460 CircleF 2123 556 CircleF @@ -802,15 +725,10 @@ LCb setrgbcolor 4033 940 CircleF 4650 1036 CircleF 5685 1132 CircleF -LTw -% End plot #4 -2.000 UL -LTb -LCb setrgbcolor -[] 0 setdash 1.000 UP 2.000 UL LTb +LCb setrgbcolor 0.00 0.00 0.00 C stroke grestore end diff --git a/pointprocesses/lecture/pointprocessscetchB.pdf b/pointprocesses/lecture/pointprocessscetchB.pdf index c9d4fdc275aa3c4d1b9798e3f43881ce482548d7..205565805ff79bbb04692d7dda387c0c89c38943 100644 GI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