QViz is a utility to quickly and interactively visualize data with by evaluating Go source code at runtime. It works by exposing the gonum/plot library to a yaegi interpreter.
Usage: qviz [OPTIONS] SCRIPT_PATH
Generate plots by writing Go scripts
Arguments:
SCRIPT_PATH path to a qviz script file
Options:
-o, --out file output path (implies headless)
-t, --type file output type [eps,jpg,pdf,png,svg,tiff] (default "jpg")
-w, --width output width (pixels) (default 900)
-h, --height output height (pixels) (default 800)
--headless do not render the UI
QViz has a built in native UI for viewing plots that will start automatically when you run the command.
# Monitor the simple.go script file for changes in real time
qviz examples/simple/simple.go
# Now open up the script file in your favorite editor
vim examples/simple/simple.go
Valid QViz scripts are normal Go files that import the pkg/stdlib
overlay package.
Example scripts can be found here.
package main
import qviz "github.com/kevinschoon/qviz/pkg/stdlib"
func main() {
// qviz.New is a convenience function that returns a
// new *plot.Plot
plt := qviz.New()
plt.Title.Text = "My New Chart"
// qviz.Render must be called at the end of your script file and only once,
// calling it before hand will halt the execution of the program.
qviz.Render(plt)
}
- CLI based plotter
- allow external user defined packages
- first class integration with qframe
- finish importing the remaining Gonum packages
- native UI