当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPlot::SetImageBorderColor方法代码示例

本文整理汇总了PHP中PHPlot::SetImageBorderColor方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPlot::SetImageBorderColor方法的具体用法?PHP PHPlot::SetImageBorderColor怎么用?PHP PHPlot::SetImageBorderColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPlot的用法示例。


在下文中一共展示了PHPlot::SetImageBorderColor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

# Testing phplot - "Typical" plot with lots of elements, for manual
require_once 'phplot.php';
$data = array(array('', -4, -64, 16, 40), array('', -3, -27, 9, 30), array('', -2, -8, 4, 20), array('', -1, -1, 1, 10), array('', 0, 0, 0, 0), array('', 1, 1, 1, -10), array('', 2, 8, 4, -20), array('', 3, 27, 9, -30), array('', 4, 64, 16, -40));
# Size of plot is set by PDF 72dpi resolution:
$p = new PHPlot(400, 300);
$p->SetDataType('data-data');
$p->SetDataValues($data);
# Titles:
$p->SetTitle('A Plot Containing Some Lines');
$p->SetXTitle('Independent Variable');
$p->SetYTitle('Dependent Variable');
# We don't use the data labels (all set to '') so might as well turn them off:
$p->SetXDataLabelPos('none');
# Need to set area and ticks to get reasonable choices.
$p->SetPlotAreaWorld(-4, -70, 4, 80);
$p->SetXTickIncrement(1);
$p->SetYTickIncrement(10);
# Don't use dashes for 3rd line:
$p->SetLineStyles(array('solid', 'dashed', 'solid'));
# Make the lines thicker:
$p->SetLineWidths(2);
# Image border:
$p->SetImageBorderType('raised');
$p->SetImageBorderColor('blue');
# Draw both grids:
$p->SetDrawXGrid(True);
$p->SetDrawYGrid(True);
# And a legend:
$p->SetLegend(array('x^3', 'x^2', '-10x'));
$p->SetPlotType('lines');
$p->DrawGraph();
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:typical.php

示例2: PHPlot

$title = "Test Attribute Resets:\n";
if (empty($test_resets)) {
    $title .= 'Baseline - red border, formatted labels';
} else {
    $title .= 'Reset to no border, no label formatting';
}
$plot = new PHPlot(400, 400);
$plot->SetTitle($title);
$plot->SetPlotType('lines');
$plot->SetDataType('data-data');
$plot->SetDataValues($data);
$plot->SetPlotAreaWorld(-1000, 0);
$plot->SetXDataLabelPos('none');
$plot->SetXTickIncrement(500);
$plot->SetXLabelType('data', 0, '', 'M');
$plot->SetYTickIncrement(200000);
$plot->SetYLabelType('data', 2);
$plot->SetImageBorderType('raised');
$plot->SetImageBorderColor('red');
$plot->SetDrawXGrid(False);
$plot->SetDrawYGrid(False);
# Set $test_resets=True and include this file to test resets:
if (!empty($test_resets)) {
    # Reset to no border:
    $plot->SetImageBorderType('none');
    # Reset X to no formatting using empty string:
    $plot->SetXLabelType('');
    # Reset Y to no formatting using no argument:
    $plot->SetYLabelType();
}
$plot->DrawGraph();
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:resets0.php

示例3:

$p->SetPrintImage(0);
// Do not output image until told
# Set up for first plot:
$p->SetDataValues($data);
$p->SetDataType('text-data');
$p->SetPlotType($plot_type);
$p->SetXTickPos('none');
$p->SetYDataLabelPos('plotin');
$p->SetTitle($title);
$p->SetXTitle('X Axis Title');
$p->SetYTitle('Y Axis Title');
$p->SetDrawPlotAreaBackground(True);
$p->SetPlotBgColor('PeachPuff');
$p->SetBackgroundColor('lavender');
$p->SetImageBorderType('solid');
$p->SetImageBorderColor('navy');
$p->SetImageBorderWidth(3);
$p->SetPlotBorderType('full');
$p->SetLegend(array('Path A', 'Path B', 'Path C', 'Path D'));
switch ($legend_positioning) {
    case 'world':
        $p->SetLegendWorld(0.1, 35);
        break;
    case 'pixels':
        $p->SetLegendPixels(50, 50);
        break;
    case 'plotrelative':
        # This places the upper left corner of the legend box at an offset of
        # (5,5) from the upper left corner of the plot area.
        $p->SetLegendPosition(0, 0, 'plot', 0, 0, 5, 5);
        break;
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:multiplot.php

示例4: PHPlot

} else {
    $message .= $text;
}
if (!empty($extra_chars)) {
    $message .= str_repeat(' Test', (int) ($extra_chars / 5));
}
$p = new PHPlot(800, 600);
if (!empty($use_gdfont)) {
    $p->SetFontGD('generic', 5);
} elseif (!empty($use_ttfont)) {
    $p->SetTTFPath($phplot_test_ttfdir);
    $p->SetFontTTF('generic', $phplot_test_ttfonts['serifitalic'], 14);
}
if (!empty($set_bgcolor)) {
    $p->SetBackgroundColor('yellow');
}
if (!empty($set_bgimage)) {
    $p->SetBgImage('images/bubbles.png', 'tile');
}
if (!empty($set_border)) {
    $p->SetImageBorderWidth(3);
    $p->SetImageBorderColor('red');
    $p->SetImageBorderType('raised');
}
if (!empty($noprint)) {
    $p->SetPrintImage(False);
}
$p->DrawMessage($message, $options);
if (!empty($noprint)) {
    echo $p->EncodeImage('raw');
}
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:drawmessage.php

示例5:

$p->SetTitle($title);
$p->SetDataType('data-data');
$p->SetDataValues($data);
$p->SetDrawXGrid(False);
$p->SetDrawYGrid(False);
if (!empty($tp['plotborder'])) {
    $p->SetPlotBorderType($tp['plotborder']);
}
if (!empty($tp['pbcolor'])) {
    $p->SetGridColor($tp['pbcolor']);
}
if (!empty($tp['imageborder'])) {
    $p->SetImageBorderType($tp['imageborder']);
}
if (!empty($tp['ibcolor'])) {
    $p->SetImageBorderColor($tp['ibcolor']);
}
if (!empty($tp['ibwidth'])) {
    $p->SetImageBorderWidth($tp['ibwidth']);
}
# Move Y axis in so affect of plot area borders is more visible:
$p->SetYAxisPosition(0);
# Turn on all side labels, ticks, titles:
$p->SetXTickLabelPos('both');
$p->SetXTickPos('both');
$p->SetYTickLabelPos('both');
$p->SetYTickPos('both');
$p->SetPlotType('lines');
$p->SetXTitle('X Axis Title Here', 'both');
$p->SetYTitle('Y Axis Title Here', 'both');
$p->DrawGraph();
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:borders.php


注:本文中的PHPlot::SetImageBorderColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。