ä¸ã®ä¸ã®ãã¨ããã£ã¨ç¥ãã«ã¯ã©ããããè¯ãã ããã¨æãã¨ãããã。ä¸ã®ä¸ã®å¤ãã®äºæã¯ãã°ããã¼ã¿ã«è½ã¨ããã。Googleãªã©ã®æ¤ç´¢ãµã¤ãã¯è¯ãä¾ã ãã。ãã¦、ãã®ãã°ããã¼ã¿ãã©ãããã°è¯ãã®ã? å¤ãã®å ´å、è¦è¦åãæå¹ãªæ段ã¨ãªã。 ã¾ãã¯èº«ã®åãã®æ¥å¸¸çãªãã¼ã¿ããã°ãä½ã¨ãããã。ãã 、æ¥å¸¸ã®ãã¼ã¿ãè¦è¦åããã®ã«æ°åè¡ä»¥ä¸ã®ã³ã¼ãã¯æ¸ããããªã。ã¾ãã§æ¯ããããã®ãã¨ãèªç¶ã«è¦è¦åãè¡ãããã®ã 。ãã®ããã«ã¯1~2è¡、é·ãã¦æ°è¡ã§æ¸ã¾ãããã¨ãå¿
è¦ã 。ããã§Pythonã¨matplotlibã使ã。å ãã¦、IPythonãããã°ãªãè¯ã。IPythonã®å°å
¥ã«ã¤ãã¦ã¯ä»¥åã®ããã°è¨äºã§ãã IPythonã®åãè¾¼ã¿ãããããç´ æ´ããã ãåèã«ãã¦æ¬²ãã。 ã¾ãã¯äºåã«numpyã¨matplotlibãã¤ã³ãã¼ããã¦ãã。ã§ããã°scipyã。 >>> from numpy import * >>> from pylab import * çãã³ã¼ãã§è¦è¦åãè¡ãããã«ã¯、Pythonã®å
å
表è¨ã¯å¿
é ã 。ä¾ãã°、5, 2, 1, 5, 8ããã¼ã¿ã¨ããã°ã©ããæ¸ãããã®ãªãIPythonã使ã£ã¦ä»¥ä¸ã®1è¡ã§å®ç¾ã§ãã。 >>> plot([5, 2, 1, 5, 8]) æ°å¤ãè¡ãã¨ã«input.txtã¨ãããã¡ã¤ã«ã«æ¸ããã¦ããå ´åã¯ä»¥ä¸ã®éã。 >>> plot([int(x) for x in file("input.txt")]) mapé¢æ°ã使ãã°ãã£ã¨ã¹ãã¼ãã«æ¸ãã。ãã¡ã¤ã«å
ã®æ°å¤ãæååã¨ãã¦é
åã§èªã¿è¾¼ã¿、ãããã®æååãmapé¢æ°ã«ããintã§æ´æ°ã«å¤æãã。 >>> plot(map(int, file("input.txt"))) ãã¦、ãã°ã2次å
ã§æ¸ããã¦ããå ´åã¯ã©ãããã®ã。ä¾ãã°ä»¥ä¸ã®ãã¼ã¿ãinput.txtã«æ¸ããã¦ããã¨ãã。 2, 2.5 5, 6.2 6, 3.6 7, 6.3 10, 1.9 ãã®å ´å、以ä¸ã®ããã«ããã°ããããã§ãã。ãã¡ã¤ã«ããè¡ãã¨ã®æååãèªã¿åºãã¦、ããã","ãåºåãã¨ãã¦ãªã¹...
Good things. Bad things.