scatter

package module
v0.0.0-...-82e5695 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2016 License: MIT Imports: 9 Imported by: 0

README

scatter

Go package for creating an animated GIF of a rotating 3D scatter plot.

Install

To install the package and its example:

go get -u github.com/ybeaudoin/go-scatter

The package imports binet's gnuplot package which can be installed as follows:

go get -u bitbucket.org/binet/go-gnuplot/pkg/gnuplot

It in turn requires that a gnuplot executable be installed and be findable via the environment path statement. See http://www.gnuplot.info/download.html for available versions.

At a glance

The package exports the following:

  • Type
    • OptSet struct
      Plot options
  • Function:
    • Plot(options OptSet, dataFile, gifFile string)
      Creates an animated GIF of a rotating 3D scatter plot.

OptSet structure

Field Type Description
TITLE string centered plot title
XLABEL string x-axis label
YLABEL string y-axis label
ZLABEL string z-axis label (will be rotated 90 degrees)
XRANGE string x-axis range
YRANGE string y-axis range
ZRANGE string z-axis range
XYPLANE float64 position at which the xy plane intersects the z-axis
COLUMNS string data columns to plot
BGCOLOR string background color specified as an hex string prefixed with the character "x"
PTCOLOR string data point color
PLOTDELAY int delay between the display of successive images in units of 1/100 second
PLOTROT int rotation angle between the display of successive images in degrees
PLOTHEIGHT int plot height in pixels
PLOTWIDTH int plot width in pixels
FONT string font name & comma-separated optional size

MIT License

Copyright (c) 2016 Yves Beaudoin [email protected]

See the file LICENSE for copying permission.

Documentation

Overview

===== Copyright 2016, Webpraxis Consulting Ltd. - ALL RIGHTS RESERVED - Email: [email protected] ===========================

  • Package scatter:
  • import "scatter"
  • Overview:
  • package for creating an animated GIF of a rotating 3D scatter plot.
  • Type:
  • OptSet
  • Structure for specifying the plot parameters
  • Function:
  • Plot(options OptSet, dataFile, gifFile string)
  • Creates an animated GIF of a rotating 3D scatter plot.
  • History:
  • v1.0.0 - November 5, 2016 - Original release. *============================================================================================================================

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plot

func Plot(options OptSet, dataFile, gifFile string)

Types

type OptSet

type OptSet struct {
	TITLE      string  //centered plot title
	XLABEL     string  //x-axis label
	YLABEL     string  //y-axis label
	ZLABEL     string  //z-axis label (will be rotated 90 degrees)
	XRANGE     string  //x-axis range
	YRANGE     string  //y-axis range
	ZRANGE     string  //z-axis range
	XYPLANE    float64 //position at which the xy plane intersects the z-axis
	COLUMNS    string  //data columns to plot
	BGCOLOR    string  //background color specified as an hex string prefixed with the character "x"
	PTCOLOR    string  //data point color
	PLOTDELAY  int     //delay between display of successive images in units of 1/100 second
	PLOTROT    int     //rotation angle between display of successive images in degrees
	PLOTHEIGHT int     //plot height in pixels
	PLOTWIDTH  int     //plot width in pixels
	FONT       string  //font name & comma-separated optional size
}

Exported ---------------------------------------------------------------------------------------------------------------------

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL