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


PHP PHPlot::SetFontGD方法代码示例

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


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

示例1: Max

$result = mysql_query("SELECT Max(player_money_total_amount) max,min(player_money_total_amount) min FROM meridian103.player_money_total;");
while ($row = mysql_fetch_assoc($result)) {
    $max = $row['max'];
    $min = $row['min'];
}
$min -= 1000000;
mysql_free_result($result);
*/
$result = mysql_query("SELECT player_money_total_amount amount, player_money_total_time time from meridian103.player_money_total where date(player_money_total_time) = date(now()) order by player_money_total_time ASC;");
while ($row = mysql_fetch_assoc($result)) {
    $data[] = array($row['time'], $row['amount']);
}
mysql_free_result($result);
mysql_close($link);
//Define the object
$plot = new PHPlot();
$plot->SetTitle("Server 103 Total Shillings over Time - Period 1 Day");
$plot->SetFontGD('y_label', 5);
$plot->SetFontGD('x_label', 5);
//$plot->SetPlotAreaWorld(NULL,$min,NULL,$max);
$plot->SetXLabelAngle(90);
$plot->SetYDataLabelPos('plotin');
$plot->SetDrawYDataLabelLines('false');
//$plot->SetFontGD('y_title', 5);
//$plot->SetFontGD('x_title', 5);
$plot->SetDataValues($data);
//Turn off X axis ticks and labels because they get in the way:
$plot->SetXTickLabelPos('none');
$plot->SetXTickPos('none');
//Draw it
$plot->DrawGraph();
开发者ID:jboullion,项目名称:Meridian59,代码行数:31,代码来源:moneytimedaily.php

示例2: array

# Set defaults:
if (!isset($options)) {
    $options = array();
}
$message = 'DrawMessage() test: ';
if (empty($text)) {
    $message .= 'All defaults';
} 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');
}
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:drawmessage.php

示例3: sprintf

#      the minimum percentage of the plot area that the actual pie will use.
require_once 'phplot.php';
# Set defaults:
if (!isset($suffix)) {
    $suffix = 'Default min_size, Labels Fit';
}
if (!isset($label_size)) {
    $label_size = 10;
}
# Built plot title:
$title = "Pie Chart Min Size Test: {$label_size} char label";
if (isset($min_size_factor)) {
    $title .= sprintf(', min size=%d%%', (int) (100 * $min_size_factor));
}
$title .= "\n" . $suffix;
# This data array is designed to have a long label at 180 degrees, to
# make the label-to-pie-to-plot area edge space visible.
$label = str_repeat('123456790', (int) ($label_size / 10)) . substr('1234567890', 0, $label_size % 10);
$data = array(array($label, 1), array($label, 2), array($label, 1));
$plot = new PHPlot(600, 400);
$plot->SetPlotType('pie');
$plot->SetDataType('text-data-single');
$plot->SetDataValues($data);
$plot->SetFontGD('generic', 5);
$plot->SetTitle($title);
$plot->SetPieLabelType('label');
$plot->SetPlotBorderType('full');
if (isset($min_size_factor)) {
    $plot->pie_min_size_factor = $min_size_factor;
}
$plot->DrawGraph();
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:pieminsize.php

示例4: PHPlot

$plot = new PHPlot($width, $height);
$plot->SetPlotType('pie');
$plot->SetDataType($data_type);
$plot->SetDataValues($data);
if (!empty($plot_margins)) {
    call_user_func_array(array($plot, 'SetMarginsPixels'), $plot_margins);
}
# Font setup
if (!empty($ttfonts)) {
    if (isset($font_size)) {
        $plot->SetFontTTF('generic', $phplot_test_ttfonts['sans'], $font_size);
    } else {
        $plot->SetFontTTF('generic', $phplot_test_ttfonts['sans']);
    }
} elseif (isset($font_size)) {
    $plot->SetFontGD('generic', $font_size);
}
$plot->SetTitle($title);
if (!empty($plot_border)) {
    $plot->SetPlotBorderType($plot_border);
}
if (isset($pie_diam_factor)) {
    $plot->pie_diam_factor = $pie_diam_factor;
}
if (isset($shading)) {
    $plot->SetShading($shading);
}
if (isset($label_pos)) {
    $plot->SetLabelScalePosition($label_pos);
}
# For backward compatibility testing:
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:piesize.php

示例5: array

<?php

# $Id$
# Dual text types: GD and TTF, default TTF, GD X and Y titles
# This requires PHPlot > 5.0.5
require_once 'phplot.php';
# TTF Font info is in this configuration file:
require 'config.php';
$data = array(array('', 0, 0, 0), array('', 10, 5, 10));
$p = new PHPlot(800, 600);
$p->SetTitle("Dual Text Types:\nDefault TTF, TTF title");
$p->SetDataType('data-data');
$p->SetDataValues($data);
$p->SetXTitle('Title of X Data, GD Font 5');
$p->SetYTitle('Title of Y Data, GD Font 3');
$p->SetTTFPath($phplot_test_ttfdir);
$p->SetDefaultTTFont($phplot_test_ttfonts['serifitalic']);
$p->SetFont('title', $phplot_test_ttfonts['serifbold'], 36);
$p->SetFontGD('x_title', 5);
$p->SetFontGD('y_title', 3);
$p->SetXDataLabelPos('none');
$p->SetLegend(array("Legend Line 1", "Legend Line 2"));
$p->SetXTickIncrement(1.0);
$p->SetYTickIncrement(1.0);
# Draw both grids:
$p->SetDrawXGrid(True);
$p->SetDrawYGrid(True);
$p->SetPlotType('lines');
$p->DrawGraph();
开发者ID:myfarms,项目名称:PHPlot,代码行数:29,代码来源:dualtext1.php

示例6: PHPlot

$p = new PHPlot(800, 600);
$p->SetTitle($title . $suffix);
$p->SetDataType('data-data');
$p->SetDataValues($data);
$p->SetImageBorderType('solid');
$p->SetYDataLabelPos('plotin');
if (isset($yd_angle)) {
    $p->SetYDataLabelAngle($yd_angle);
}
if (isset($y_type)) {
    $p->SetYLabelType($y_type, $y_type_arg);
}
if (isset($yd_type)) {
    $p->SetYDataLabelType($yd_type, $yd_type_arg);
}
if (isset($y_label_font)) {
    if (isset($y_label_font_ttfsize)) {
        $p->SetFontTTF('y_label', $y_label_font, $y_label_font_ttfsize);
    } else {
        $p->SetFontGD('y_label', $y_label_font);
    }
}
$p->SetXLabelType('data', 3);
$p->SetPlotType($plot_type);
if (isset($dvl_angle)) {
    $p->data_value_label_angle = $dvl_angle;
}
if (isset($dvl_dist)) {
    $p->data_value_label_distance = $dvl_dist;
}
$p->DrawGraph();
开发者ID:myfarms,项目名称:PHPlot,代码行数:31,代码来源:mdvl.php


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