亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? winplot.pas

?? Delphi 的數學控件
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
{ **********************************************************************
  *                          Unit WINPLOT.PAS                          *
  *                            Version 1.3d                            *
  *                      (c) J. Debord, May 2002                       *
  **********************************************************************
                      Plotting routines for DELPHI
  ********************************************************************** }

unit winplot;

interface

uses
  { DELPHI units }
  WinTypes,
  Graphics,
  { TPMath units }
  fmath,
  matrices,
  pastring,
  plotvar;

const
  MAXCOLOR = 10;

const
  CurvColor : array[1..MAXCOLOR] of TColor =
    (clRed,
     clGreen,
     clBlue,
     clFuchsia,
     clAqua,
     clLime,
     clNavy,
     clOlive,
     clPurple,
     clTeal);

type     
  TPointParam = record         { Point parameters }
    Symbol : Integer;          { Symbol index }
    Size   : Integer;          { Symbol size in 1/250 of graphic width }
    Color  : TColor;
  end;

  TLineParam = record          { Line parameters }
    Width : Integer;
    Style : TPenStyle;
    Color : TColor;
  end;

  TCurvParam = record          { Curve parameters }
    PointParam : TPointParam;
    LineParam  : TLineParam;
    Legend     : String[30];   { Legend of curve }
    Step       : Integer;      { Plot 1 point every Step points }
    Connect    : Boolean;      { Connect points with line? }
  end;

  TCurvParamVector = array of TCurvParam;

procedure InitGraph(Canvas        : TCanvas;
                    Width, Height : Integer);
{ ----------------------------------------------------------------------
  Initializes the graphic
  ----------------------------------------------------------------------
  The parameters refer to the object on which the graphic is plotted.

  Examples:

  To draw on a TImage object:
  InitGraph(Image1.Canvas, Image1.Width, Image1.Height);

  To print the graphic:
  InitGraph(Printer.Canvas, Printer.PageWidth, Printer.PageHeight);
  ---------------------------------------------------------------------- }

procedure PlotXAxis(Canvas : TCanvas);
{ ----------------------------------------------------------------------
  Plots the X axis
  ---------------------------------------------------------------------- }

procedure PlotYAxis(Canvas : TCanvas);
{ ----------------------------------------------------------------------
  Plots the Y axis
  ---------------------------------------------------------------------- }

procedure WriteTitle(Canvas : TCanvas);
{ ----------------------------------------------------------------------
  Writes the title of the graph
  ---------------------------------------------------------------------- }

procedure PlotGrid(Canvas : TCanvas);
{ ----------------------------------------------------------------------
  Plots a grid on the graph
  ---------------------------------------------------------------------- }

procedure PlotPoint(Canvas     : TCanvas;
                    X, Y       : Float;
                    PointParam : TPointParam);
{ ----------------------------------------------------------------------
  Plots a point
  ----------------------------------------------------------------------
  X, Y       : point coordinates
  PointParam : point parameters
  ---------------------------------------------------------------------- }

procedure PlotCurve(Canvas         : TCanvas;
                    X, Y           : TVector;
                    Lbound, Ubound : Integer;
                    CurvParam      : TCurvParam);
{ ----------------------------------------------------------------------
  Plots a curve
  ----------------------------------------------------------------------
  X, Y           : point coordinates
  Lbound, Ubound : indices of first and last points
  CurvParam      : curve parameters
  ---------------------------------------------------------------------- }

procedure PlotCurveWithErrorBars(Canvas         : TCanvas;
                                 X, Y, S        : TVector;
                                 Ns             : Integer;
                                 Lbound, Ubound : Integer;
                                 CurvParam      : TCurvParam);
{ ----------------------------------------------------------------------
  Plots a curve with error bars
  ----------------------------------------------------------------------
  X, Y           : point coordinates
  S              : errors (e.g. standard deviations)
  Ns             : error multiplier (e.g. 2 for plotting 2 SD's) 
  Lbound, Ubound : indices of first and last points
  CurvParam      : curve parameters
  ---------------------------------------------------------------------- }

procedure PlotFunc(Canvas     : TCanvas;
                   Func       : TFunc;
                   Xmin, Xmax : Float;
                   Npt        : Integer;
                   LineParam  : TLineParam);
{ ----------------------------------------------------------------------
  Plots a function
  ----------------------------------------------------------------------
  Func       : function to be plotted
               must be programmed as: function Func(X : Float) : Float;
  Xmin, Xmax : abscissae of 1st and last point to plot
  Npt        : number of points
  LineParam  : line parameters
  ---------------------------------------------------------------------- }

procedure WriteLegend(Canvas     : TCanvas;
                      NCurv      : Integer;
                      CurvParam  : TCurvParamVector;
                      ShowPoints,
                      ShowLines  : Boolean);
{ ----------------------------------------------------------------------
  Writes the legends for the plotted curves
  ----------------------------------------------------------------------
  NCurv      : number of curves
  CurvParam  : curve parameters
  ShowPoints : for displaying points
  ShowLines  : for displaying lines
  ---------------------------------------------------------------------- }

procedure DimCurvParamVector(var CurvParam : TCurvParamVector;
                             Ubound : Integer);
{ ----------------------------------------------------------------------
  Creates a vector of curve parameters: CurvParam[0..Ubound]
  ---------------------------------------------------------------------- }

function Xpixel(X : Float) : Integer;
{ ----------------------------------------------------------------------
  Converts user abscissa X to screen coordinate
  ---------------------------------------------------------------------- }

function Ypixel(Y : Float) : Integer;
{ ----------------------------------------------------------------------
  Converts user ordinate Y to screen coordinate
  ---------------------------------------------------------------------- }

function Xuser(X : Integer) : Float;
{ ----------------------------------------------------------------------
  Converts screen coordinate X to user abscissa
  ---------------------------------------------------------------------- }

function Yuser(Y : Integer) : Float;
{ ----------------------------------------------------------------------
  Converts screen coordinate Y to user ordinate
  ---------------------------------------------------------------------- }

implementation

uses
  Classes, SysUtils;

const
  MAXPIXEL = 30000;

var
  GraphWidth, GraphHeight, SymbolSizeUnit : Integer;

  XminPixel, YminPixel : Integer;  { Pixel coord. of upper left corner }
  XmaxPixel, YmaxPixel : Integer;  { Pixel coord. of lower right corner }
  FactX, FactY         : Float;    { Scaling factors }
  HugeX, HugeY         : Float;    { Max. values of X and Y }

  function Xpixel(X : Float) : Integer;
  var
    Delta : Float;
  begin
    Delta := X - XAxis.Min;
    if Abs(Delta) > HugeX then
      Xpixel := MAXPIXEL
    else
      Xpixel := Round(FactX * Delta) + XminPixel;
  end;

  function Ypixel(Y : Float) : Integer;
  var
    Delta : Float;
  begin
    Delta := YAxis.Max - Y;
    if Abs(Delta) > HugeY then
      Ypixel := MAXPIXEL
    else
      Ypixel := Round(FactY * Delta) + YminPixel;
  end;

  function Xuser(X : Integer) : Float;
  begin
    Xuser := XAxis.Min + (X - XminPixel) / FactX;
  end;

  function Yuser(Y : Integer) : Float;
  begin
    Yuser := YAxis.Max - (Y - YminPixel) / FactY;
  end;

  procedure PlotXAxis(Canvas : TCanvas);
  var
    W, X, Z : Float;
    N, I, J, TickLength, MinorTickLength, Wp, Xp : Integer;
    XLabel : String;
    NSZ : Boolean;
  begin
    TickLength := Canvas.TextHeight('M') div 2;
    MinorTickLength := Round(0.67 * TickLength);  { For log scale }

    { Draw axis }
    Canvas.MoveTo(XminPixel, YmaxPixel);
    Canvas.LineTo(XmaxPixel, YmaxPixel);

    NSZ := NSZero;
    NSZero := False;    { Don't write non significant zero's }

    N := Round((XAxis.Max - XAxis.Min) / XAxis.Step); { Nb of intervals }

    X := XAxis.Min;     { Tick mark position }
    for I := 0 to N do  { Label axis }
      begin
        if (XAxis.Scale = LIN_SCALE) and (Abs(X) < EPS) then X := 0.0;
        Xp := Xpixel(X);

        { Draw tick mark }
        Canvas.MoveTo(Xp, YmaxPixel);
        Canvas.LineTo(Xp, YmaxPixel + TickLength);

        { Write label }
        if XAxis.Scale = LIN_SCALE then Z := X else Z := Exp10(X);
        XLabel := Trim(Float2Str(Z));
        Canvas.TextOut(Xp - Canvas.TextWidth(XLabel) div 2,
                       YmaxPixel + TickLength, XLabel);

        { Plot minor divisions on logarithmic scale }
        if (XAxis.Scale = LOG_SCALE) and (I < N) then
          for J := 2 to 9 do
            begin
              W := X + Log10(J);
              Wp := Xpixel(W);
              Canvas.MoveTo(Wp, YmaxPixel);
              Canvas.LineTo(Wp, YmaxPixel + MinorTickLength);
            end;
        X := X + XAxis.Step;
      end;

    NSZero := NSZ;

    { Write axis title }
    if XAxis.Title <> '' then
      Canvas.TextOut(XminPixel + (XmaxPixel - XminPixel -
                          Canvas.TextWidth(XAxis.Title)) div 2,
                     YmaxPixel + 2 * Canvas.TextHeight('M'),
                     XAxis.Title);
  end;

  procedure PlotYAxis(Canvas : TCanvas);
  var
    W, Y, Z : Float;
    N, I, J, Wp, Yp : Integer;
    TickLength, MinorTickLength, Yoffset : Integer;
    YLabel : String;
    NSZ : Boolean;
  begin
    TickLength := Canvas.TextWidth('M') div 2;
    MinorTickLength := Round(0.67 * TickLength);  { For log scale }

    Yoffset := Canvas.TextHeight('M') div 2;

    { Draw axis }
    Canvas.MoveTo(XminPixel, YminPixel);
    Canvas.LineTo(XminPixel, YmaxPixel);

    NSZ := NSZero;
    NSZero := False;    { Don't write non significant zero's }

    N := Round((YAxis.Max - YAxis.Min) / YAxis.Step); { Nb of intervals }

    Y := YAxis.Min;     { Tick mark position }
    for I := 0 to N do  { Label axis }
      begin
        if (YAxis.Scale = LIN_SCALE) and (Abs(Y) < EPS) then Y := 0.0;
        Yp := Ypixel(Y);

        { Draw tick mark }
        Canvas.MoveTo(XminPixel, Yp);
        Canvas.LineTo(XminPixel - TickLength, Yp);

        { Write label }
        if YAxis.Scale = LIN_SCALE then Z := Y else Z := Exp10(Y);
        YLabel := Trim(Float2Str(Z));
        Canvas.TextOut(XminPixel - TickLength - Canvas.TextWidth(YLabel),
                       Yp - Yoffset, YLabel);

        { Plot minor divisions on logarithmic scale }
        if (YAxis.Scale = LOG_SCALE) and (I < N) then
          for J := 2 to 9 do
            begin
              W := Y + Log10(J);
              Wp := Ypixel(W);
              Canvas.MoveTo(XminPixel, Wp);
              Canvas.LineTo(XminPixel - MinorTickLength, Wp);
            end;
        Y := Y + YAxis.Step;
      end;

    NSZero := NSZ;

    { Write axis title }
    if YAxis.Title <> '' then
      Canvas.TextOut(XminPixel, YminPixel - 3 * Yoffset, YAxis.Title);
  end;

  procedure InitGraph(Canvas : TCanvas; Width, Height : Integer);
  begin
    GraphWidth := Width;
    GraphHeight := Height;
    SymbolSizeUnit := GraphWidth div 250;

    XminPixel := Round(Xwin1 / 100 * Width);
    YminPixel := Round(Ywin1 / 100 * Height);
    XmaxPixel := Round(Xwin2 / 100 * Width);
    YmaxPixel := Round(Ywin2 / 100 * Height);

    FactX := (XmaxPixel - XminPixel) / (XAxis.Max - XAxis.Min);
    FactY := (YmaxPixel - YminPixel) / (YAxis.Max - YAxis.Min);

    HugeX := MAXPIXEL / FactX;
    HugeY := MAXPIXEL / FactY;

    if GraphBorder then
      Canvas.Rectangle(XminPixel, YminPixel, Succ(XmaxPixel), Succ(YmaxPixel));
  end;

  procedure WriteTitle(Canvas : TCanvas);
  begin
    if GraphTitle <> '' then
      with Canvas do
        TextOut((XminPixel + XmaxPixel - TextWidth(GraphTitle)) div 2,
                 YminPixel - 2 * TextHeight(GraphTitle), GraphTitle);
  end;

  procedure PlotGrid(Canvas : TCanvas);
  var
    X, Y : Float;
    I, N, Xp, Yp : Integer;
    PenStyle : TpenStyle;
  begin
    { Save current settings }
    PenStyle := Canvas.Pen.Style;
    Canvas.Pen.Style := psDot;

    if Grid in [HORIZ_GRID, BOTH_GRID] then  { Horizontal lines }
      begin
        N := Round((YAxis.Max - YAxis.Min) / YAxis.Step);  { Nb of intervals }
        for I := 1 to Pred(N) do
          begin
            Y := YAxis.Min + I * YAxis.Step;  { Origin of line }
            Yp := Ypixel(Y);
            Canvas.MoveTo(XminPixel, Yp);
            Canvas.LineTo(XmaxPixel, Yp);
          end;
      end;

    if Grid in [VERTIC_GRID, BOTH_GRID] then  { Vertical lines }
      begin
        N := Round((XAxis.Max - XAxis.Min) / XAxis.Step);
        for I := 1 to Pred(N) do
          begin
            X := XAxis.Min + I * XAxis.Step;
            Xp := Xpixel(X);
            Canvas.MoveTo(Xp, YminPixel);
            Canvas.LineTo(Xp, YmaxPixel);
          end;
      end;

    { Restore settings }
    Canvas.Pen.Style := PenStyle;
  end;

  function XOutOfBounds(X : Integer) : Boolean;
  { Checks if an absissa is outside the graphic bounds }
  begin
    XOutOfBounds := (X < XminPixel) or (X > XmaxPixel);
  end;

  function YOutOfBounds(Y : Integer) : Boolean;
  { Checks if an ordinate is outside the graphic bounds }
  begin
    YOutOfBounds := (Y < YminPixel) or (Y > YmaxPixel);
  end;

  function CheckPoint(X, Y       : Float;
                      var Xp, Yp : Integer) : Boolean;
  { Computes the pixel coordinates of a point and
    checks if it is enclosed within the graph limits }
  begin
    Xp := Xpixel(X);
    Yp := Ypixel(Y);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人精品一区| 久久午夜色播影院免费高清| 美国十次了思思久久精品导航| 在线成人小视频| 亚洲午夜免费视频| 国产麻豆精品在线| 欧美精品一区二区三区在线| 成人免费av资源| 欧美精品一区二区三区蜜桃视频| 国产精品第四页| 成人国产精品免费| 日韩免费性生活视频播放| 久久久综合精品| 亚洲第一激情av| 欧美午夜片在线观看| 亚洲国产精品传媒在线观看| 蜜臂av日日欢夜夜爽一区| 在线免费观看日韩欧美| 亚洲精品va在线观看| 久久精品噜噜噜成人av农村| 久久精品免费在线观看| 99精品久久久久久| 亚洲一区二区影院| 欧美片网站yy| 日韩av中文字幕一区二区三区| 91黄色激情网站| 国产午夜精品久久久久久久| 麻豆精品国产91久久久久久| 日日夜夜免费精品视频| 欧美性大战久久| 亚洲成人动漫一区| 日韩欧美国产1| 亚洲电影一级片| 欧美在线免费观看视频| 精品毛片乱码1区2区3区| 蜜桃视频一区二区三区| 亚洲精品一区二区三区蜜桃下载| 亚洲成人在线网站| 欧美一区二区三区免费| 亚洲日本在线天堂| 欧美日韩免费观看一区二区三区| 亚洲国产一区二区三区| 日韩一卡二卡三卡| 国产成人一区二区精品非洲| 国产欧美精品在线观看| 一本久久a久久免费精品不卡| 香蕉加勒比综合久久| 欧美日韩精品免费| 天天色综合天天| 日韩一区二区三区视频| 亚洲一二三四在线| 欧美成人a视频| 色综合久久综合中文综合网| 精品系列免费在线观看| 久久女同性恋中文字幕| 丝袜美腿亚洲综合| 欧美一区二区视频在线观看2020| 日韩精品亚洲一区| 精品久久久久一区二区国产| 国产美女在线观看一区| 国产三级欧美三级日产三级99 | 欧美影院一区二区| 亚洲精品菠萝久久久久久久| 91国在线观看| 蜜臀久久99精品久久久久宅男 | 久久精品国产亚洲5555| www.99精品| 亚洲精品视频观看| 欧美一区二区三区在线| 久久国产麻豆精品| 中文子幕无线码一区tr| 91福利视频网站| 日韩vs国产vs欧美| 亚洲一级二级在线| 99精品欧美一区二区蜜桃免费| 亚洲乱码国产乱码精品精可以看| 欧美日韩精品一区二区三区四区| 日韩va欧美va亚洲va久久| 国产亚洲制服色| 日本久久电影网| 毛片不卡一区二区| 国产精品久久777777| 欧美日韩久久一区二区| 国内久久精品视频| 一区二区视频免费在线观看| 91精品国产色综合久久ai换脸| 国产精品香蕉一区二区三区| 亚洲一区在线观看免费 | 成人av电影免费观看| 亚洲午夜一区二区三区| 久久视频一区二区| 欧美在线一二三| 欧美一级一级性生活免费录像| 一级女性全黄久久生活片免费| 不卡av在线免费观看| 精品国产电影一区二区| 国产精品第一页第二页第三页| 中文一区在线播放| 精品国产乱码久久久久久老虎| 中文字幕日韩欧美一区二区三区| 国产精品久久99| 久久久综合激的五月天| 久久婷婷久久一区二区三区| 国产精品水嫩水嫩| 91精品欧美一区二区三区综合在 | 欧美tk—视频vk| 99久久久精品| 久久精品国产亚洲高清剧情介绍| 一区视频在线播放| 亚洲成人动漫在线观看| 麻豆国产精品官网| 岛国一区二区在线观看| 94色蜜桃网一区二区三区| 欧美性生活大片视频| 综合激情成人伊人| 亚洲综合成人网| 天堂av在线一区| 国产精品一区二区久激情瑜伽| 99精品偷自拍| 中文字幕一区二区三区四区 | 国产伦精品一区二区三区在线观看| 国产成人午夜视频| 欧美自拍丝袜亚洲| 久久综合狠狠综合久久综合88| 国产欧美日韩卡一| 午夜视频在线观看一区二区三区| 色偷偷一区二区三区| 精品成人佐山爱一区二区| 久久免费偷拍视频| 欧美mv日韩mv国产网站| 亚洲妇熟xx妇色黄| 欧美国产综合色视频| 色老汉一区二区三区| 欧美日韩亚洲综合一区二区三区| 国产福利91精品一区二区三区| 日本不卡一区二区三区| 亚洲成a人v欧美综合天堂| 亚洲一区二区三区中文字幕| 国产精品成人免费精品自在线观看| 精品国产精品一区二区夜夜嗨| 日韩一区二区三区四区| 欧美久久久久中文字幕| 日本二三区不卡| 国产呦精品一区二区三区网站| 欧美xxxx老人做受| 蜜乳av一区二区| 日韩手机在线导航| 美女爽到高潮91| 精品国一区二区三区| 天堂成人免费av电影一区| 欧美成人三级在线| 亚洲精品乱码久久久久| 91在线小视频| 亚洲精品国久久99热| 4438x亚洲最大成人网| 国产福利一区二区三区视频| 日本成人中文字幕在线视频| 亚洲一区在线观看免费| 亚洲日本青草视频在线怡红院| 亚洲夂夂婷婷色拍ww47 | 午夜精品久久久久影视| 一区在线观看视频| 国产精品热久久久久夜色精品三区 | 国产酒店精品激情| 精品综合免费视频观看| 热久久久久久久| 日韩电影在线一区| 一区二区三区四区蜜桃 | 3d成人动漫网站| 看片的网站亚洲| 中文字幕av一区 二区| 欧美少妇bbb| 国产精品一区在线观看乱码| 日韩不卡在线观看日韩不卡视频| 久久久久国产免费免费 | 国产91在线|亚洲| 成人高清在线视频| 色哟哟国产精品| 欧美日韩在线不卡| 日韩一区二区电影| 国产丝袜美腿一区二区三区| 国产精品久久久久久亚洲毛片| 亚洲视频免费看| 亚洲高清免费视频| 狠狠v欧美v日韩v亚洲ⅴ| 国产黄色精品视频| 91亚洲精品一区二区乱码| 欧日韩精品视频| 欧美成人性福生活免费看| 欧美—级在线免费片| 亚洲视频一区在线观看| 天堂成人免费av电影一区| 国产一区二区三区四| 成人动漫av在线| 欧美三级视频在线观看| 精品国产亚洲一区二区三区在线观看| 日本一区二区在线不卡| 亚洲欧美激情小说另类| 蜜桃视频免费观看一区| 不卡的电影网站|