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

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

?? logarithmicaxis.java

?? Web圖形化的Java庫
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* ======================================
 * JFreeChart : a free Java chart library
 * ======================================
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 * Project Lead:  David Gilbert (david.gilbert@object-refinery.com);
 *
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation;
 * either version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with this
 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * --------------------
 * LogarithmicAxis.java
 * --------------------
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * Original Author:  Michael Duffy / Eric Thomas;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *                   David M. O'Donnell;
 *
 * $Id: LogarithmicAxis.java,v 1.9 2003/07/29 16:07:45 mungady Exp $
 *
 * Changes
 * -------
 * 14-Mar-2002 : Version 1 contributed by Michael Duffy (DG);
 * 19-Apr-2002 : drawVerticalString(...) is now drawRotatedString(...) in RefineryUtilities (DG);
 * 23-Apr-2002 : Added a range property (DG);
 * 15-May-2002 : Modified to be able to deal with negative and zero values (via new
 *               'adjustedLog10()' method);  occurrences of "Math.log(10)" changed to "LOG10_VALUE";
 *               changed 'intValue()' to 'longValue()' in 'refreshTicks()' to fix label-text value
 *               out-of-range problem; removed 'draw()' method; added 'autoRangeMinimumSize' check;
 *               added 'log10TickLabelsFlag' parameter flag and implementation (ET);
 * 25-Jun-2002 : Removed redundant import (DG);
 * 25-Jul-2002 : Changed order of parameters in ValueAxis constructor (DG);
 * 16-Jul-2002 : Implemented support for plotting positive values arbitrarily
 *               close to zero (added 'allowNegativesFlag' flag) (ET).
 * 05-Sep-2002 : Updated constructor reflecting changes in the Axis class (DG);
 * 02-Oct-2002 : Fixed errors reported by Checkstyle (DG);
 * 08-Nov-2002 : Moved to new package com.jrefinery.chart.axis (DG);
 * 22-Nov-2002 : Bug fixes from David M. O'Donnell (DG);
 * 14-Jan-2003 : Changed autoRangeMinimumSize from Number --> double (DG);
 * 20-Jan-2003 : Removed unnecessary constructors (DG);
 * 26-Mar-2003 : Implemented Serializable (DG);
 * 08-May-2003 : Fixed plotting of datasets with lower==upper bounds when
 *               'minAutoRange' is very small; added 'strictValuesFlag'
 *               and default functionality of throwing a runtime exception
 *               if 'allowNegativesFlag' is false and any values are less
 *               than or equal to zero; added 'expTickLabelsFlag' and
 *               changed to use "1e#"-style tick labels by default
 *               ("10^n"-style tick labels still supported via 'set'
 *               method); improved generation of tick labels when range of
 *               values is small; changed to use 'NumberFormat.getInstance()'
 *               to create 'numberFormatterObj' (ET);
 * 14-May-2003 : Merged HorizontalLogarithmicAxis and VerticalLogarithmicAxis (DG);
 *
 */

package org.jfree.chart.axis;

import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.geom.Rectangle2D;
import java.text.DecimalFormat;
import java.text.NumberFormat;

import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.ValueAxisPlot;
import org.jfree.data.Range;
import org.jfree.ui.RectangleEdge;

/**
 * A numerical axis that uses a logarithmic scale.
 * 
 * @author Michael Duffy
 */
public class LogarithmicAxis extends NumberAxis {

    /** Useful constant for log(10). */
    public static final double LOG10_VALUE = Math.log(10.0);

    /** Smallest arbitrarily-close-to-zero value allowed. */
    public static final double SMALL_LOG_VALUE = 1e-100;

    /** Flag set true to allow negative values in data. */
    protected boolean allowNegativesFlag = false;

    /** Flag set true make axis throw exception if any values are
      * <= 0 and 'allowNegativesFlag' is false. */
    protected boolean strictValuesFlag = true;

    /** Number formatter for generating numeric strings. */
    protected final NumberFormat numberFormatterObj = NumberFormat.getInstance();

    /** Flag set true for "1e#"-style tick labels. */
    protected boolean expTickLabelsFlag = false;

    /** Flag set true for "10^n"-style tick labels. */
    protected boolean log10TickLabelsFlag = true;

    /** Helper flag for log axis processing. */
    protected boolean smallLogFlag = false;

    /**
     * Creates a new axis.
     *
     * @param label  the axis label.
     */
    public LogarithmicAxis(String label) {
        super(label);
        setupNumberFmtObj();      //setup number formatter obj
    }

    /**
     * Sets the 'allowNegativesFlag' flag; true to allow negative values
     * in data, false to be able to plot positive values arbitrarily close to zero.
     *
     * @param flgVal  the new value of the flag.
     */
    public void setAllowNegativesFlag(boolean flgVal) {
        allowNegativesFlag = flgVal;
    }

    /**
     * Returns the 'allowNegativesFlag' flag; true to allow negative values
     * in data, false to be able to plot positive values arbitrarily close
     * to zero.
     *
     * @return the flag.
     */
    public boolean getAllowNegativesFlag() {
        return allowNegativesFlag;
    }

    /**
     * Sets the 'strictValuesFlag' flag; if true and 'allowNegativesFlag'
     * is false then this axis will throw a runtime exception if any of its
     * values are less than or equal to zero; if false then the axis will
     * adjust for values less than or equal to zero as needed.
     *
     * @param flgVal true for strict enforcement.
     */
    public void setStrictValuesFlag(boolean flgVal) {
      strictValuesFlag = flgVal;
    }

    /**
     * Returns the 'strictValuesFlag' flag; if true and 'allowNegativesFlag'
     * is false then this axis will throw a runtime exception if any of its
     * values are less than or equal to zero; if false then the axis will
     * adjust for values less than or equal to zero as needed.
     *
     * @return true if strict enforcement is enabled.
     */
    public boolean getStrictValuesFlag() {
      return strictValuesFlag;
    }

    /**
     * Sets the 'expTickLabelsFlag' flag.  If the 'log10TickLabelsFlag'
     * is false then this will set whether or not "1e#"-style tick labels
     * are used.  The default is to use "1e#"-style tick labels.
     *
     * @param flgVal true for "1e#"-style tick labels, false for
     * log10 or regular numeric tick labels.
     */
    public void setExpTickLabelsFlag(boolean flgVal) {
        expTickLabelsFlag = flgVal;
        setupNumberFmtObj();             //setup number formatter obj
    }

    /**
     * Returns the 'expTickLabelsFlag' flag.
     *
     * @return  true for "1e#"-style tick labels, false for log10 or
     * regular numeric tick labels.
     */
    public boolean getExpTickLabelsFlag() {
      return expTickLabelsFlag;
    }

    /**
     * Sets the 'log10TickLabelsFlag' flag.  The default value is false.
     *
     * @param flag true for "10^n"-style tick labels, false for "1e#"-style
     * or regular numeric tick labels.
     */
    public void setLog10TickLabelsFlag(boolean flag) {
        log10TickLabelsFlag = flag;
    }

    /**
     * Returns the 'log10TickLabelsFlag' flag.
     *
     * @return true for "10^n"-style tick labels, false for "1e#"-style
     * or regular numeric tick labels.
     */
    public boolean getLog10TickLabelsFlag() {
        return log10TickLabelsFlag;
    }

    /**
     * Overridden version that calls original and then sets up flag for
     * log axis processing.
     *
     * @param range  the new range.
     */
    public void setRange(Range range) {
        super.setRange(range);      // call parent method
        setupSmallLogFlag();        // setup flag based on bounds values
    }

    /**
     * Sets up flag for log axis processing.  Set true if negative values
     * not allowed and the lower bound is between 0 and 10.
     */
    protected void setupSmallLogFlag() {
        // set flag true if negative values not allowed and the
        // lower bound is between 0 and 10:
        final double lowerVal = getRange().getLowerBound();
        this.smallLogFlag = (!allowNegativesFlag && lowerVal < 10.0 && lowerVal > 0.0);
    }

    /**
     * Sets up the number formatter object according to the
     * 'expTickLabelsFlag' flag.
     */
    protected void setupNumberFmtObj() {
      if (numberFormatterObj instanceof DecimalFormat) {
                        //setup for "1e#"-style tick labels or regular
                        // numeric tick labels, depending on flag:
        ((DecimalFormat) numberFormatterObj).applyPattern(expTickLabelsFlag ? "0E0" : "0.###");
      }
    }

    /**
     * Returns the log10 value, depending on if values between 0 and
     * 1 are being plotted.  If negative values are not allowed and
     * the lower bound is between 0 and 10 then a normal log is
     * returned; otherwise the returned value is adjusted if the
     * given value is less than 10.
     *
     * @param val the value.
     *
     * @return log<sub>10</sub>(val).
     */
    protected double switchedLog10(double val) {
      return smallLogFlag ? Math.log(val) / LOG10_VALUE : adjustedLog10(val);
    }

    /**
     * Returns an adjusted log10 value for graphing purposes.  The first
     * adjustment is that negative values are changed to positive during
     * the calculations, and then the answer is negated at the end.  The
     * second is that, for values less than 10, an increasingly large
     * (0 to 1) scaling factor is added such that at 0 the value is
     * adjusted to 1, resulting in a returned result of 0.
     *
     * @param val  value for which log10 should be calculated.
     *
     * @return an adjusted log<sub>10</sub>(val).
     */
    public double adjustedLog10(double val) {
        final boolean negFlag;
        if (negFlag = (val < 0.0)) {
            val = -val;                  // if negative then set flag and make positive
        }
        if (val < 10.0) {                // if < 10 then
            val += (10.0 - val) / 10;    //increase so 0 translates to 0
        }
        //return value; negate if original value was negative:
        return negFlag ? -(Math.log(val) / LOG10_VALUE) : (Math.log(val) / LOG10_VALUE);
    }

    /**
     * Returns the largest (closest to positive infinity) double value that is
     * not greater than the argument, is equal to a mathematical integer and
     * satisfying the condition that log base 10 of the value is an integer
     * (i.e., the value returned will be a power of 10: 1, 10, 100, 1000, etc.).
     *
     * @param lower a double value below which a floor will be calcualted.
     *
     * @return 10<sup>N</sup> with N .. { 1 ... }
     */
    protected double computeLogFloor(double lower) {

        double logFloor;
        if (allowNegativesFlag) {
            //negative values are allowed

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚一区二区| 中文字幕综合网| 亚洲一区二区三区四区在线免费观看| 日韩国产在线一| 成人黄色大片在线观看| 欧美一区二区三区日韩视频| 亚洲日本乱码在线观看| 精品在线亚洲视频| 欧美日韩综合在线免费观看| 日本一区二区成人| 国产精品自拍毛片| 日韩欧美国产三级| 日韩中文字幕91| 欧美色爱综合网| 亚洲激情自拍视频| 不卡的av网站| 国产精品区一区二区三| 激情久久五月天| 日韩一区二区在线观看| 亚洲影院在线观看| 欧美中文字幕不卡| 一区二区三区欧美| 91麻豆6部合集magnet| 国产精品久久99| 成人sese在线| 亚洲九九爱视频| 在线观看日韩一区| 亚洲国产精品一区二区久久 | 成人网页在线观看| 日韩一区二区在线免费观看| 日韩二区三区在线观看| 欧美美女一区二区在线观看| 亚洲一区在线免费观看| 色视频成人在线观看免| 一卡二卡欧美日韩| 欧美日韩在线精品一区二区三区激情| 一区二区三区日韩欧美| 欧美羞羞免费网站| 日韩高清在线不卡| 精品国产乱码久久久久久免费| 免费亚洲电影在线| 欧美精品一区二区三区很污很色的| 日韩国产成人精品| 久久久久久久综合日本| 国产99一区视频免费| 中文字幕欧美三区| 91国产丝袜在线播放| 亚洲一区二区三区四区在线免费观看| 欧美日韩激情在线| 久久国产精品99久久人人澡| 国产色91在线| 一本大道av伊人久久综合| 亚洲一区在线观看网站| 欧美一区二区女人| 成人综合日日夜夜| 一区二区三区日本| 亚洲精品一区二区三区99| 成人午夜短视频| 亚洲综合一二区| 精品国产91亚洲一区二区三区婷婷| 国产乱码一区二区三区| 亚洲四区在线观看| 91精品婷婷国产综合久久性色| 国产一区二区三区| 亚洲精品中文字幕乱码三区 | 中日韩av电影| 欧美日韩国产乱码电影| 国产一区二区三区在线观看免费视频 | 久久久久久一级片| 91国偷自产一区二区三区观看| 日韩成人免费看| 国产精品萝li| 欧美一区二区成人| 91小宝寻花一区二区三区| 日韩精品亚洲专区| 中文字幕一区二区三区不卡在线| 欧美午夜精品久久久久久孕妇| 国内成+人亚洲+欧美+综合在线| 自拍偷拍国产精品| 精品精品国产高清a毛片牛牛| 波多野结衣精品在线| 免费人成精品欧美精品| 亚洲视频一区在线观看| 日韩欧美一级二级| 欧美亚洲丝袜传媒另类| 国产ts人妖一区二区| 亚洲成人777| 亚洲美女屁股眼交| 久久精品亚洲精品国产欧美kt∨ | 99久久精品久久久久久清纯| 日本三级亚洲精品| 亚洲综合小说图片| ...av二区三区久久精品| 久久久久成人黄色影片| 5月丁香婷婷综合| 欧美日韩国产一级二级| 色婷婷亚洲一区二区三区| 国产91露脸合集magnet| 九九九精品视频| 视频一区视频二区中文字幕| 亚洲一区二区av电影| 日韩美女视频一区| 中文字幕中文字幕一区二区| 欧美成人综合网站| 欧美一区二区三区在线| 欧美日韩国产精品自在自线| 色综合欧美在线视频区| 色综合久久66| 在线影院国内精品| 色综合中文综合网| 欧美精品乱码久久久久久| 色综合一个色综合亚洲| 国产毛片一区二区| 午夜激情一区二区三区| 亚洲一区二区三区四区不卡| 中文字幕一区二区三区在线不卡| 久久久精品国产免费观看同学| 日韩一级黄色片| 日韩视频一区二区三区 | 夜夜揉揉日日人人青青一国产精品| 国产精品婷婷午夜在线观看| 国产欧美日韩在线看| 欧美激情在线免费观看| 欧美国产欧美综合| 国产精品久久久久久户外露出 | 国产成人精品免费一区二区| 国产精品资源站在线| 国产69精品久久久久777| 国产东北露脸精品视频| 国产精品一卡二卡在线观看| 国产精品1区2区| av在线综合网| 色猫猫国产区一区二在线视频| 91久久奴性调教| 911精品产国品一二三产区| 日韩视频123| 国产欧美综合色| 亚洲黄网站在线观看| 日韩国产在线观看| 国产激情偷乱视频一区二区三区| a级精品国产片在线观看| 91高清视频免费看| 日韩三级视频在线看| 亚洲国产精品精华液ab| 一区二区三区在线看| 日韩精品欧美精品| 国产成人一区在线| 在线国产亚洲欧美| 亚洲精品在线免费播放| 中文字幕一区二区三区乱码在线| 午夜影院久久久| 国产福利一区二区| 欧美日韩免费视频| 国产情人综合久久777777| 一区二区三区四区不卡视频 | 亚洲h动漫在线| 国产一区免费电影| 色吊一区二区三区| 精品久久99ma| 亚洲一区二区视频在线观看| 精品一区二区免费| 91国偷自产一区二区三区成为亚洲经典 | 日本不卡的三区四区五区| 粉嫩高潮美女一区二区三区| 在线观看日产精品| 国产精品全国免费观看高清| 麻豆一区二区三| 一本到一区二区三区| 精品欧美乱码久久久久久1区2区| 亚洲男女一区二区三区| 国精产品一区一区三区mba桃花| 91麻豆精东视频| 国产欧美精品国产国产专区| 日本免费在线视频不卡一不卡二| 99久久精品免费看| 国产欧美日韩视频在线观看| 美国十次综合导航| 91精品国产综合久久精品| 亚洲三级小视频| 岛国av在线一区| 日韩精品综合一本久道在线视频| 夜夜嗨av一区二区三区四季av| 成人激情小说网站| 久久久久久久久久久黄色| 日本三级韩国三级欧美三级| 欧美日韩在线精品一区二区三区激情| 国产精品美女久久久久久久久| 九九精品视频在线看| 91精品国产综合久久久久久漫画| 亚洲成人免费影院| 欧洲生活片亚洲生活在线观看| 中文字幕一区二区日韩精品绯色| 国产不卡视频一区二区三区| 337p日本欧洲亚洲大胆精品| 精品在线播放午夜| 日韩欧美精品三级| 久久99最新地址| 久久免费午夜影院| 东方欧美亚洲色图在线| 国产日产亚洲精品系列|