画图python库matplotlib教程

所需积分/C币:50 2017-11-12 15:36:44 8.2MB PDF
0
收藏 收藏
举报

画图python库matplotlib教程,里面包含wx,pyqt,和网络使用等
Credits Author Editorial team leader Sandro Tosi Akshara Aware Reviewers Project Team Leader Michael droettboom Priya Mushet Reinier heeres Acquisition Editor Project C。 ordinator Usha lyer Zainab Bagasrawala Development Editor Proofreader Rakesh Shejwal Lesley Harrison Technical editor Graphics Namita sahn Nilesh mohite Production Coordinator Copy Editor Adline swetha jesuthas Leonard d'silya Cover work Indexers Adline swetha jesuthas Monica Ajmera Hemangini b Download at wowe Book com PACK PUBLISHING About the author Sandro Tosi was born in Firenze italy) in the early 80s, and graduated with a B Sc in Computer Science from the University of Firenze His personal passions for Linux, Python (and programming), and computer technology are luckily a part of his daily job, where he has gained a lot of experience in systems and applications management, database administration, as well as project management and development After having worked for five years as an eai and an application architect in an energy multinational, he's now working as a system administrator for an important European Internet company I'd like to thank Laura, who has assisted and supported me while writing this book Download at wowe Book com PACK PUBLISHING About the reviewers Michael Droettboom holds a Master's Degree in Computer Music Research from The Johns Hopkins University. His research in optical music recognition lead to the development of the Gamera document image analysis framework, which has been used to recognize features in documents as diverse as medieval manuscript Navajo texts, historical Scottish census data, and early american sheet music. His focus on computer graphics has lead to specializations in consumer electronics, computer-assisted engineering, and most recently, the science software for the Space Telescope Science Institute. He is currently one of the most active developers on the Matplotlib project I wish to thank my son Kai, for asking all the hard questions Reinier heeres has an MSc degree in Applied Physics from the Delft University of Technology The netherlands he is currently pursuing a phd there in the quantum Transport group of the nanoscience department He has previously worked on Sugar, the child-friendly user interface mainly in use by One Laptop Per Child's $100 laptop. For this project, he designed the Calculator application Recently, he revived and extended the 3D plotting functionalities for Matplotlib to make it an excellent 2D graphing library, and a simple 3D plotting tool again Download at wowe Book com PACK PUBLISHING Download at wowe Book com PACK PUBLISHING Table of contents Preface Chapter 1: Introduction to Matplotlib 7 Merits of Matplotlib 8 Matplotlib web sites and online documentation 10 Output formats and backends 10 Output formats Backends 12 About dependencies 13 Build dependencies 15 Installing Matplotlib 15 Installing Matplotlib on Linux 15 Installing Matplotlib on Windows 16 Installing Matplotlib on Mac Os X Installing Matplotlib using packaged Python distributions 17 Installing Matplotlib from source code Testing our installation 18 Summary Chapter 2: Getting Started with Matplotlib 21 First plots with Matplotlib 21 Multiline plots 25 a brief introduction to num Py arrays Grid, axes, and labels 28 Adding a grid 28 Handling axes 29 Adding labels 31 Titles and legends 32 Adding a title 32 Adding a legend 33 Download at wowe Book com PACK PUBLISHING Table of contents A complete example 35 Saving plots to a file 36 Interactive navigation toolbar 38 IPython support 40 Controlling the interactive mode 42 Suppressing functions output 43 Configuring Matplotlib 43 Configuration files 44 Configuring through the Python code 45 Selecting backend from code 46 Summary 47 Chapter 3: Decorate Graphs with Plot Styles and Types 49 Markers and line styles 49 Control colors 50 Specifying styles in multiline plots Control line styles 52 Control marker styles 53 Finer control with keyword arguments 56 Handling x and y ticks 58 Plot types 59 Histogram charts 59 Error bar charts Bar charts 63 Pie charts 67 Scatter plots 69 Polar charts 71 Navigation Toolbar with polar plots 73 Control radial and angular grids 73 Text inside figure, annotations, and arrows Text inside figure 74 Annotations 75 Arrows Summary Chapter 4: Advanced Matplotlib 81 Object-oriented versus MATLAB styles 81 A brief introduction to Matplotlib objects 85 Our first (simple)example of Oo Matplotlib 85 Subplots 86 Multiple figures 88 Additional Y(or X)axes 89 Download at wowe Book com PACK PUBLISHING Table of Contents ogarithmic axes Share axes 92 Plotting dates 94 Date formatting 95 Axes formatting with axes tick locators and formatters 96 Custom formatters and locators 99 Text properties, fonts, and LateX 99 F onts 101 Using LaTeX formatting 102 Mathtext 103 External TeX renderer Contour plots and image plotting 106 Contour plots 06 age plotting 109 ummary 111 Chapter 5: Embedding Matplotlib in GTK+ 113 a brief introduction to gtk+ 113 Introduction to GTK+ signal system 115 Embedding a Matplotlib figure in a GTK+ window 116 Including a navigation toolbar 119 Real-time plots update 123 Embedding Matplotlib in a Glade application 132 Designing the GUl using glade 132 Code to use glade gul 135 Summary 144 Chapter 6: Embedding Matplotlib in Qt 4 145 Brief introduction to Qt 4 and pyQt4 145 Embedding a Matplotlib figure in a Qt window 147 Including a navigation toolbar 151 Real-time update of a matplotlib graph 156 Embedding Matplotlib in a GUI made with Qt Designer 165 Designing the GUI using Qt Designer 165 Code to use the Qt Designer GUI 168 Introduction to signals and slots 171 Returning to the example 172 Summary 179 Chapter 7: Embedding Matplotlib in wXWidgets 181 Brief introduction to wxWidgets and wxPython 181 Embedding a Matplotlib figure in a wXFrame 182 Including a navigation toolbar 186 Download at wowe Book com PACK PUBLISHING Table of contents Real-time plots update 192 Embedding matplotlib in a gui made with wx Glade 203 Summary 213 Chapter 8: Matplotlib for the Web 215 Matplotlib and cgl 216 What is cGi 216 Configuring Apache for CGI execution 216 Simple CGI example 218 Matplotlib in a cgi script 219 Passing parameters to a CGl script 220 Matplotlib and mod_ python 223 What is mod python 223 Apache configuration for mod_python 224 Matplotlib in a mod python example 226 Matplotlib and mod _python,s Python Server Pages 228 Web frameworks and mvc 231 Matplotlib and Django 232 What is django 232 Matplotlib in a Django application 233 Matplotlib and Pylons 237 What is Pylons 237 Matplotlib in a Pylons application 238 Summary 242 Chapter 9: Matplotlib in the real world 243 Plotting data from a database 244 Plotting data from the Web 247 Plotting data by parsing an Apache log file 250 Plotting data from a csv file 256 Plotting extrapolated data using curve fitting 261 Tools using Matplotlib 267 NetworkX 267 pma 269 Plotting geographical data 271 First example 272 Using satellite background 274 Plot data over a map 275 Plotting shapefiles with Basemap 277 Summary 279 Index 281 Download at wowe Book com PACK PUBLISHING

...展开详情
试读 127P 画图python库matplotlib教程
立即下载 低至0.43元/次 身份认证VIP会员低至7折
抢沙发
一个资源只可评论一次,评论内容不能少于5个字
上传资源赚积分or赚钱
    最新推荐
    画图python库matplotlib教程 50积分/C币 立即下载
    1/127
    画图python库matplotlib教程第1页
    画图python库matplotlib教程第2页
    画图python库matplotlib教程第3页
    画图python库matplotlib教程第4页
    画图python库matplotlib教程第5页
    画图python库matplotlib教程第6页
    画图python库matplotlib教程第7页
    画图python库matplotlib教程第8页
    画图python库matplotlib教程第9页
    画图python库matplotlib教程第10页
    画图python库matplotlib教程第11页
    画图python库matplotlib教程第12页
    画图python库matplotlib教程第13页
    画图python库matplotlib教程第14页
    画图python库matplotlib教程第15页
    画图python库matplotlib教程第16页
    画图python库matplotlib教程第17页
    画图python库matplotlib教程第18页
    画图python库matplotlib教程第19页
    画图python库matplotlib教程第20页

    试读结束, 可继续阅读

    50积分/C币 立即下载 >