python 画风矢量图
来源:互联网 发布:php ajax提交form表单 编辑:程序博客网 时间:2024/05/01 20:57
python 画风矢量图参考
Quiver plot arrow aspect ratio
https://stackoverflow.com/questions/12079842/quiver-plot-arrow-aspect-ratio
2D quiver plot - matplotlib and MATLAB output doesnt match
https://stackoverflow.com/questions/22568256/2d-quiver-plot-matplotlib-and-matlab-output-doesnt-match
基于python的QuikScat风场数据可视化
http://bbs.06climate.com/forum.php?mod=viewthread&tid=53589
quiver(*args, data=None, **kw) method of matplotlib.axes._subplots.AxesSubplot instance Plot a 2-D field of arrows. Call signatures:: quiver(U, V, **kw) quiver(U, V, C, **kw) quiver(X, Y, U, V, **kw) quiver(X, Y, U, V, C, **kw) *U* and *V* are the arrow data, *X* and *Y* set the location of the arrows, and *C* sets the color of the arrows. These arguments may be 1-D or 2-D arrays or sequences. If *X* and *Y* are absent, they will be generated as a uniform grid. If *U* and *V* are 2-D arrays and *X* and *Y* are 1-D, and if ``len(X)`` and ``len(Y)`` match the column and row dimensions of *U*, then *X* and *Y* will be expanded with :func:`numpy.meshgrid`. The default settings auto-scales the length of the arrows to a reasonable size. To change this behavior see the *scale* and *scale_units* kwargs. The defaults give a slightly swept-back arrow; to make the head a triangle, make *headaxislength* the same as *headlength*. To make the arrow more pointed, reduce *headwidth* or increase *headlength* and *headaxislength*. To make the head smaller relative to the shaft, scale down all the head parameters. You will probably do best to leave minshaft alone. *linewidths* and *edgecolors* can be used to customize the arrow outlines. Parameters ---------- X : 1D or 2D array, sequence, optional The x coordinates of the arrow locations Y : 1D or 2D array, sequence, optional The y coordinates of the arrow locations U : 1D or 2D array or masked array, sequence The x components of the arrow vectors V : 1D or 2D array or masked array, sequence The y components of the arrow vectors C : 1D or 2D array, sequence, optional The arrow colors units : [ 'width' | 'height' | 'dots' | 'inches' | 'x' | 'y' | 'xy' ] The arrow dimensions (except for *length*) are measured in multiples of this unit. 'width' or 'height': the width or height of the axis 'dots' or 'inches': pixels or inches, based on the figure dpi 'x', 'y', or 'xy': respectively *X*, *Y*, or :math:`\sqrt{X^2 + Y^2}` in data units The arrows scale differently depending on the units. For 'x' or 'y', the arrows get larger as one zooms in; for other units, the arrow size is independent of the zoom state. For 'width or 'height', the arrow size increases with the width and height of the axes, respectively, when the window is resized; for 'dots' or 'inches', resizing does not change the arrows. angles : [ 'uv' | 'xy' ], array, optional Method for determining the angle of the arrows. Default is 'uv'. 'uv': the arrow axis aspect ratio is 1 so that if *U*==*V* the orientation of the arrow on the plot is 45 degrees counter-clockwise from the horizontal axis (positive to the right). 'xy': arrows point from (x,y) to (x+u, y+v). Use this for plotting a gradient field, for example. Alternatively, arbitrary angles may be specified as an array of values in degrees, counter-clockwise from the horizontal axis. Note: inverting a data axis will correspondingly invert the arrows only with ``angles='xy'``. scale : None, float, optional Number of data units per arrow length unit, e.g., m/s per plot width; a smaller scale parameter makes the arrow longer. Default is *None*. If *None*, a simple autoscaling algorithm is used, based on the average vector length and the number of vectors. The arrow length unit is given by the *scale_units* parameter scale_units : [ 'width' | 'height' | 'dots' | 'inches' | 'x' | 'y' | 'xy' ], None, optional If the *scale* kwarg is *None*, the arrow length unit. Default is *None*. e.g. *scale_units* is 'inches', *scale* is 2.0, and ``(u,v) = (1,0)``, then the vector will be 0.5 inches long. If *scale_units* is 'width'/'height', then the vector will be half the width/height of the axes. If *scale_units* is 'x' then the vector will be 0.5 x-axis units. To plot vectors in the x-y plane, with u and v having the same units as x and y, use ``angles='xy', scale_units='xy', scale=1``. width : scalar, optional Shaft width in arrow units; default depends on choice of units, above, and number of vectors; a typical starting value is about 0.005 times the width of the plot. headwidth : scalar, optional Head width as multiple of shaft width, default is 3 headlength : scalar, optional Head length as multiple of shaft width, default is 5 headaxislength : scalar, optional Head length at shaft intersection, default is 4.5 minshaft : scalar, optional Length below which arrow scales, in units of head length. Do not set this to less than 1, or small arrows will look terrible! Default is 1 minlength : scalar, optional Minimum length as a multiple of shaft width; if an arrow length is less than this, plot a dot (hexagon) of this diameter instead. Default is 1. pivot : [ 'tail' | 'mid' | 'middle' | 'tip' ], optional The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name *pivot*. color : [ color | color sequence ], optional This is a synonym for the :class:`~matplotlib.collections.PolyCollection` facecolor kwarg. If *C* has been set, *color* has no effect. Notes ----- Additional :class:`~matplotlib.collections.PolyCollection` keyword arguments: =========================================================================================== =============================================================================================================================================== Property Description =========================================================================================== =============================================================================================================================================== :meth:`agg_filter <matplotlib.artist.Artist.set_agg_filter>` unknown :meth:`alpha <matplotlib.collections.Collection.set_alpha>` float or None :meth:`animated <matplotlib.artist.Artist.set_animated>` [True | False] :meth:`antialiased <matplotlib.collections.Collection.set_antialiased>` or antialiaseds Boolean or sequence of booleans :meth:`array <matplotlib.cm.ScalarMappable.set_array>` unknown :meth:`clim <matplotlib.cm.ScalarMappable.set_clim>` a length 2 sequence of floats :meth:`clip_box <matplotlib.artist.Artist.set_clip_box>` a :class:`matplotlib.transforms.Bbox` instance :meth:`clip_on <matplotlib.artist.Artist.set_clip_on>` [True | False] :meth:`clip_path <matplotlib.artist.Artist.set_clip_path>` [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] :meth:`cmap <matplotlib.cm.ScalarMappable.set_cmap>` a colormap or registered colormap name :meth:`color <matplotlib.collections.Collection.set_color>` matplotlib color arg or sequence of rgba tuples :meth:`contains <matplotlib.artist.Artist.set_contains>` a callable function :meth:`edgecolor <matplotlib.collections.Collection.set_edgecolor>` or edgecolors matplotlib color spec or sequence of specs :meth:`facecolor <matplotlib.collections.Collection.set_facecolor>` or facecolors matplotlib color spec or sequence of specs :meth:`figure <matplotlib.artist.Artist.set_figure>` a :class:`matplotlib.figure.Figure` instance :meth:`gid <matplotlib.artist.Artist.set_gid>` an id string :meth:`hatch <matplotlib.collections.Collection.set_hatch>` [ '/' | '\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] :meth:`label <matplotlib.artist.Artist.set_label>` string or anything printable with '%s' conversion. :meth:`linestyle <matplotlib.collections.Collection.set_linestyle>` or dashes or linestyles ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) | ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'None'`` | ``' '`` | ``''``] :meth:`linewidth <matplotlib.collections.Collection.set_linewidth>` or linewidths or lw float or sequence of floats :meth:`norm <matplotlib.cm.ScalarMappable.set_norm>` unknown :meth:`offset_position <matplotlib.collections.Collection.set_offset_position>` unknown :meth:`offsets <matplotlib.collections.Collection.set_offsets>` float or sequence of floats :meth:`path_effects <matplotlib.artist.Artist.set_path_effects>` unknown :meth:`picker <matplotlib.artist.Artist.set_picker>` [None|float|boolean|callable] :meth:`pickradius <matplotlib.collections.Collection.set_pickradius>` unknown :meth:`rasterized <matplotlib.artist.Artist.set_rasterized>` [True | False | None] :meth:`sketch_params <matplotlib.artist.Artist.set_sketch_params>` unknown :meth:`snap <matplotlib.artist.Artist.set_snap>` unknown :meth:`transform <matplotlib.artist.Artist.set_transform>` :class:`~matplotlib.transforms.Transform` instance :meth:`url <matplotlib.artist.Artist.set_url>` a url string :meth:`urls <matplotlib.collections.Collection.set_urls>` unknown :meth:`visible <matplotlib.artist.Artist.set_visible>` [True | False] :meth:`zorder <matplotlib.artist.Artist.set_zorder>` any number =========================================================================================== =============================================================================================================================================== See Also -------- quiverkey : Add a key to a quiver plot
阅读全文
0 0
- python 画风矢量图
- js画矢量图
- 矢量图
- 矢量图
- 矢量图
- Python游戏引擎开发(七):绘制矢量图
- 用dhtml和javascript画矢量图的英文版
- d3.js画矢量图+可拖拽的实现思路(未测试)
- 使用Visio画矢量图 线条组合图形填充颜色
- SVG矢量图
- 矢量图文件格式
- 常用矢量图
- iOS 矢量图
- 制作矢量图
- 矢量图动画
- VectorDrawable(矢量图)
- 矢量图VectorDrawable
- VectorDrawable矢量图
- 面向对象编程-鸵鸟到底是不是鸟?企鹅是不是鸟?
- 机器学习--决策树理解
- MySQL常用指令整理
- mac下ppt打开后没有显示怎么办
- 代码传奇 | 身价10亿的程序员 雷军当年也为他打工——WPS之父 求伯君
- python 画风矢量图
- 在20岁到30岁的约定
- java习题-(七)
- in查询优化
- Aras innovator: 粗绘innovator框架
- Git 通过 TortoiseGit 使用
- 软件架构师的12项修炼——关系技能修炼(2)
- MATLAB下提高图片亮度
- css让图片居中