⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 phplot.php

📁 java开源项目源代码
💻 PHP
字号:
<?php/* $Id: phplot.php,v 1.1 2005/10/25 08:13:53 daintree Exp $ *//* * PHPLOT Version 5.0.rc1 * Copyright (C) 1998, 1999, 2000, 2001 Afan Ottenheimer.  Released under * the GPL and PHP licenses as stated in the the README file which should * have been included with this document. * * Recent (2003-2004) work by Miguel de Benito Delgado <nonick AT vodafone DOT es> * * Requires PHP 4.2.0 or later (CHECK THIS) */if (! defined(__FUNCTION__))    define(__FUNCTION__, '__FUNCTION__ Requires at least PHP 4.3.0.');define ('MINY', -1);        // Indexes in $data (for DrawXDataLine())define ('MAXY', -2);define ('TOTY', -3);error_reporting(E_ALL);class PHPlot {    /* I have removed internal variable declarations, some isset() checking was required,     * but now the variables left are those which can be tweaked by the user. This is intended to     * be the first step towards moving most of the Set...() methods into a subclass which will be     * used only when strictly necessary. Many users will be able to put default values here in the     * class and thus avoid memory overhead and reduce parsing times.     */    //////////////// CONFIG PARAMETERS //////////////////////    var $is_inline = FALSE;             // FALSE = Sends headers, TRUE = sends just raw image data    var $browser_cache = FALSE;         // FALSE = Sends headers for browser to not cache the image,                                        // (only if is_inline = FALSE also)    var $safe_margin = 5;               // Extra margin used in several places. In pixels    var $x_axis_position = '';          // Where to draw both axis (world coordinates),    var $y_axis_position = '';          // leave blank for X axis at 0 and Y axis at left of plot.    var $xscale_type = 'linear';        // linear, log    var $yscale_type = 'linear';//Fonts    var $use_ttf  = FALSE;                  // Use True Type Fonts?    var $ttf_path = '.';                    // Default path to look in for TT Fonts.    var $default_ttfont = 'benjamingothic.ttf';    var $line_spacing = 4;                  // Pixels between lines.    // Font angles: 0 or 90 degrees for fixed fonts, any for TTF    var $x_label_angle = 0;                 // For labels on X axis (tick and data)    var $y_label_angle = 0;                 // For labels on Y axis (tick and data)    var $x_title_angle = 0;                 // Don't change this if you don't want to screw things up!    var $y_title_angle = 90;                // Nor this.    var $title_angle = 0;                   // Or this.//Formats    var $file_format = 'png';    var $output_file = '';                  // For output to a file instead of stdout//Data    var $data_type = 'text-data';           // text-data, data-data-error, data-data, text-data-single    var $plot_type= 'linepoints';           // bars, lines, linepoints, area, points, pie, thinbarline, squared    var $label_scale_position = 0.5;        // Shifts data labes in pie charts. 1 = top, 0 = bottom    var $group_frac_width = 0.7;            // value from 0 to 1 = width of bar groups    var $bar_width_adjust = 1;              // 1 = bars of normal width, must be > 0    var $y_precision = 1;    var $x_precision = 1;    var $data_units_text = '';              // Units text for 'data' labels (i.e: '

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -