Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!
当前位置: 主页 > Java文档 > Java基础相关 >

matplotlib users guide PDF 下载


分享到:
时间:2020-10-03 09:14来源:http://www.java1234.com 作者:转载  侵权举报
matplotlib users guide PDF 下载
失效链接处理
matplotlib users guide PDF 下载

本站整理下载:
提取码:yo9v 
 
 
相关截图:
 
主要内容:

Chapter 1
Introduction
matplotlib is a library for making 2D plots of arrays in python. Although it has its origins in emulating the MATLABTM
graphics commands, it does not require MATLABTM, and can be used in a pythonic, object oriented way. Although
matplotlib is written primarily in pure python, it makes heavy use of NumPy and other extension code to provide good
performance even for large arrays.
matplotlib is designed with the philosophy that you should be able to create simple plots with just a few commands,
or just one! If you want to see a histogram of your data, you shouldn’t need to instantiate objects, call methods, set
properties, and so it; it should just work.
For years, I used to use MATLABTM exclusively for data analysis and visualization. MATLABTM excels at making
nice looking plots easy. When I began working with EEG data, I found that I needed to write applications to interact
with my data, and developed and EEG analysis application in MATLABTM. As the application grew in complexity,
interacting with databases, http servers, manipulating complex data structures, I began to strain against the limitations
of MATLABTM as a programming language, and decided to start over in python. python more than makes up for all
of matlab’s deficiencies as a programming language, but I was having difficulty finding a 2D plotting package (for 3D
VTK more than exceeds all of my needs).
When I went searching for a python plotting package, I had several requirements:
• Plots should look great - publication quality. One important requirement for me is that the text looks good
(antialiased, etc)
• Postscript output for inclusion with TEX documents
• Embeddable in a graphical user interface for application development
• Code should be easy enough that I can understand it and extend it.
• Making plots should be easy.
Finding no package that suited me just right, I did what any self-respecting python programmer would do: rolled up
my sleeves and dived in. Not having any real experience with computer graphics, I decided to emulate MATLABTM’s
plotting capabilities because that is something MATLABTM does very well. This had the added advantage that many
people have a lot of MATLABTM experience, and thus they can quickly get up to steam plotting in python. From a
developer’s perspective, having a fixed user interface (the pylab interface) has been very useful, because the guts of
the code base can be redesigned without affecting user code.
The matplotlib code is conceptually divided into three parts: the pylab interface is the set of functions provided
by matplotlib.pylab which allow the user to create plots with code quite similar to MATLABTM figure generating
code. The matplotlib frontend or matplotlib API is the set of classes that do the heavy lifting, creating and managing
figures, text, lines, plots and so on. This is an abstract interface that knows nothing about output. The backends
are device dependent drawing devices, aka renderers, that transform the frontend representation to hardcopy or a
display device. Example backends: PS creates postscript hardcopy, SVG creates scalar vector graphics hardcopy, Agg
7
creates PNG output using the high quality antigrain library that ships with matplotlib - http://antigrain.com, GTK
embeds matplotlib in a GTK application, GTKAgg uses the antigrain renderer to create a figure and embed it a GTK
application, and so on for WX, Tkinter, FLTK. . . .
matplotlib is used by many people in many different contexts. Some people want to automatically generate
postscript files to send to a printer or publishers. Others deploy matplotlib on a web application server to generate
PNG output for inclusion in dynamically generated web pages. Some use matplotlib interactively from the python
shell in Tkinter on windows. My primary use is to embed matplotlib in a GTK EEG application that runs on windows,
linux and OS X.
Because there are so many ways people want to use a plotting library, there is a certain amount of complexity
inherent in configuring the library so that it will work naturally the way you want it to. Before diving into these details,
let’s first explore matplotlib’s simplicity by comparing a typical matplotlib script with its analog in MATLABTM.
— JDH
1.1 Migrating from MATLABTM
Using matplotlib should come naturally if you have ever plotted with MATLABTM and should be fairly straightforward
if you haven’t. Like all interpreted languages used for serious number crunching, python has an extension module for
processing numeric arrays. NumPy comes with many MATLABTM-compatible analysis functions, which matplotlib
extends. The example code below shows two complete scripts: on the left hand side is python with matplotlib, and on
the right is MATLABTM.

 
 
------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐