zoukankan      html  css  js  c++  java
  • matlab scatter3函数

    matlab scatter3函数

    Syntax

    scatter3(X,Y,Z)
    scatter3(X,Y,Z,S)
    scatter3(X,Y,Z,S,C)
    scatter3(___,'filled')
    scatter3(___,markertype)
    scatter3(___,Name,Value)
    scatter3(ax,___)
    h = scatter3(___)

    Description

    scatter3(X,Y,Z) displays circles at the locations specified by the vectors X, Y, and Z.

    scatter3(X,Y,Z,S) draws each circle with the size specified by S. To plot each circle with equal size, specify S as a scalar. To plot each circle with a specific size, specify S as a vector.

    scatter3(X,Y,Z,S,C) draws each circle with the color specified by C.

    • If C is a character vector of a color name or an RGB triplet, then all circles are plotted with the specified color.

    • If C is a three column matrix with the number of rows in C equal to the length of X, Y, and Z, then each row of C specifies an RGB color value for the corresponding circle.

    • If C is a vector with length equal to the length of X, Y, and Z, then the values in C are linearly mapped to the colors in the current colormap.

    scatter3(___,'filled') fills in the circles, using any of the input argument combinations in the previous syntaxes.

    scatter3(___,markertype) specifies the marker type.

    scatter3(___,Name,Value) specifies scatter series properties using one or more Name,Value pair arguments.

    scatter3(ax,___) plots into the axes specified by ax instead of into the current axes (gca). The ax option can precede any of the input argument combinations in the previous syntaxes.

    h = scatter3(___) returns the scatter series object. Use h to modify properties of the scatter series after it is created.

    Examples

    1、Create a 3-D scatter plot. Use sphere to define vectors x, y, and z.

    figure
    [X,Y,Z] = sphere(16);
    x = [0.5*X(:); 0.75*X(:); X(:)];
    y = [0.5*Y(:); 0.75*Y(:); Y(:)];
    z = [0.5*Z(:); 0.75*Z(:); Z(:)];
    scatter3(x,y,z)

    2、Fill in Markers

    Create vectors x and y as cosine and sine values with random noise.

    z = linspace(0,4*pi,250);
    x = 2*cos(z) + rand(1,250);
    y = 2*sin(z) + rand(1,250);

    Create a 3-D scatter plot and fill in the markers. Use view to change the angle of the axes in the figure.

    scatter3(x,y,z,'filled')
    view(-30,10)

    代码参考:matlab帮助手册

  • 相关阅读:
    Python接收邮件并保存至MySQL
    openerp 7.0邮件接收中文附件乱码问题解决办法
    openerp 7.0邮件多用户发送失败问题 解决方法
    OpenERP7测试手记之
    Windows Live Writer配置步骤
    发布Live Writer代码着色插件CNBlogs.CodeHighlighter
    拒绝平庸,与众不同
    openerp学习笔记 视图继承(tree、form、search)
    软件开发中团队首领的好坏之分
    解耦——Hybrid H5跨平台性思考
  • 原文地址:https://www.cnblogs.com/herd/p/13831465.html
Copyright © 2011-2022 走看看