From 0ee873700378b995b441b1be6652178f741aea5b Mon Sep 17 00:00:00 2001 From: Srikant Patnaik Date: Fri, 27 Feb 2015 17:10:12 +0530 Subject: Changed '%pylab inline' to '%matplotlib inline' to fix warning messages across 138 files --- Optical_Fiber_Communications_Principles_and_Practice/Chapter_12.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Optical_Fiber_Communications_Principles_and_Practice/Chapter_12.ipynb') diff --git a/Optical_Fiber_Communications_Principles_and_Practice/Chapter_12.ipynb b/Optical_Fiber_Communications_Principles_and_Practice/Chapter_12.ipynb index 38f7d751..38f16b21 100755 --- a/Optical_Fiber_Communications_Principles_and_Practice/Chapter_12.ipynb +++ b/Optical_Fiber_Communications_Principles_and_Practice/Chapter_12.ipynb @@ -379,7 +379,7 @@ { "cell_type": "code", "collapsed": false, - "input": "%pylab inline\nimport math\nfrom pylab import *\nfrom numpy import *\n\n#Variable declaration\nacr=1 #connector loss in dB\nafc=5 #loss per kilometer in dB\nLbu=0.1 #fiber length between each of the access couplers\nLac=1 #insertion loss\nLtr=10 #loss due to the tap ratio\nLsp=3 #splitting loss\n \n#Calculating, we get two equation in terms of N, no of nodes, i.e C(1,N-1)=(3.5*N)+8.5 and C(star)=4.5+(10*log10(N)) \n\n#For Bus distribution system\n\nfor N in range(1,13,1):\n C=(3.5*N)+8.5;\n a=plot(N,C,'.r')\n \n \n#for Star distribution system\n \nfor N in range(1,30,1):\n C1=4.5+(10*log10(N));\n b=plot(N,C1,'.g')\n \n \n#To show plot in same graph\n#Graphical comparison showing total channel loss against number of nodes\n\nplt.annotate('Linear Bus',xy=(10, 43.5), xytext=(11, 40))\nplt.annotate('Star',xy=(16, 15), xytext=(17, 13))\nxlabel(\"Number of nodes $N$\")\nylabel(\"Total channel loss $CL$ (dB)\")\ntitle(\"Characteristics showing the total channel loss against the number of nodes\")\ngrid()\nshow(a)\nshow(b)\n", + "input": "%matplotlib inline\nimport math\nfrom pylab import *\nfrom numpy import *\n\n#Variable declaration\nacr=1 #connector loss in dB\nafc=5 #loss per kilometer in dB\nLbu=0.1 #fiber length between each of the access couplers\nLac=1 #insertion loss\nLtr=10 #loss due to the tap ratio\nLsp=3 #splitting loss\n \n#Calculating, we get two equation in terms of N, no of nodes, i.e C(1,N-1)=(3.5*N)+8.5 and C(star)=4.5+(10*log10(N)) \n\n#For Bus distribution system\n\nfor N in range(1,13,1):\n C=(3.5*N)+8.5;\n a=plot(N,C,'.r')\n \n \n#for Star distribution system\n \nfor N in range(1,30,1):\n C1=4.5+(10*log10(N));\n b=plot(N,C1,'.g')\n \n \n#To show plot in same graph\n#Graphical comparison showing total channel loss against number of nodes\n\nplt.annotate('Linear Bus',xy=(10, 43.5), xytext=(11, 40))\nplt.annotate('Star',xy=(16, 15), xytext=(17, 13))\nxlabel(\"Number of nodes $N$\")\nylabel(\"Total channel loss $CL$ (dB)\")\ntitle(\"Characteristics showing the total channel loss against the number of nodes\")\ngrid()\nshow(a)\nshow(b)\n", "language": "python", "metadata": {}, "outputs": [ -- cgit