Giter Site home page Giter Site logo

jvision's Introduction

概述

该包包含了一些可视化功能,可以添加下列maven依赖使用它

    <repositories>
        <repository>
            <id>github</id>
            <url>https://maven.pkg.github.com/gcs-zhn/jvision</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>top.gcszhn</groupId>
            <artifactId>jvision</artifactId>
            <version>1.2</version>
        </dependency>
    </dependencies>

同时github的maven registry要求登录认证,即只允许github用户下载,不像maven**仓库无需注册即可下载。具体配置有官方文档,主要是在settings.xml中配置server,注意token不是登录密码,需要自行创建,快捷链接

  <servers>
      <server>
      <id>github</id>
      <username>你的github账号</username>
      <password>你的github创建的具有下载package权限的token</password>
    </server>
   </servers>

使用

目前支持两种图形类型

  1. 绘制示例环形统计图
import top.gcszhn.jvision.chart.RingDiagram;
public class Test {
    public static void main(String[] args) {
        float[] valueRange0 = new float[] { 0.9f, 1f };
        RingDiagram ringDiagram0 = new RingDiagram(
                "Precision",
                600,
                600,
                0.2f,
                new float[] { 80, 200 },
                valueRange0,
                90,
                -336,
                (valueRange0[1] - valueRange0[0]) / 15,
                true);
        ringDiagram0.setFontFamily("Calibri");
        ringDiagram0.setFontStyle(Font.PLAIN);
        ringDiagram0.loadData("sample/ring_diagram_data/data-precision-Wilcoxon.csv");
        ringDiagram0.draw("sample/ring_diagram_data/data-precision-Wilcoxon.pdf");
        ringDiagram0.draw("sample/ring_diagram_data/data-precision-Wilcoxon.png");
        ringDiagram0.draw("sample/ring_diagram_data/data-precision-Wilcoxon.eps");
    }
}

ring diagram 2. 绘制环形直方图

import top.gcszhn.jvision.chart.CircularHistogram;
public class Test {
    public static void main(String[] args) {
        CircularHistogram histogram = new CircularHistogram();
        histogram.setFontFamily("Courier New");
        histogram.loadData("sample/circular_histogram_data/sample.csv", true, 100, true);
        histogram.draw("sample/circular_histogram_data/sample.pdf");
        histogram.draw("sample/circular_histogram_data/sample.eps");
        histogram.draw("sample/circular_histogram_data/sample.png");
    }
}

CircularHistogram

更新预告

  • 支持flowChart
  • 支持多样本进展时间线

jvision's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.