7 Commits

Author SHA1 Message Date
kojix2
4f17579846 v0.4.2 2021-06-10 11:35:35 +09:00
kojix2
81df12a033 Changed width option from Integer to Numeric
This is to keep consistency with other options
2021-06-10 11:33:46 +09:00
kojix2
a8073bc684 Convert xlim and ylim types to numbers
Fix (#18)
2021-06-10 11:19:35 +09:00
kojix2
23bb767afe Revert "Accept hyphens as an output option"
This reverts commit dfc027d972.

No need to change.
2021-06-08 17:44:53 +09:00
kojix2
dfc027d972 Accept hyphens as an output option 2021-06-07 23:51:46 +09:00
kojix2
7a1bacccbc Update README.md
Center the logo and badge
2021-06-04 00:20:54 +09:00
kojix2
92989eb582 🚀 Transferred YouPlot to RedDataTools 2021-06-03 12:01:07 +09:00
4 changed files with 23 additions and 21 deletions

View File

@@ -1,16 +1,19 @@
<p align="center"> <div align="center">
<img src="logo.svg" width="60%" height="60%" /> <img src="logo.svg" width="66%" height="66%" />
</p>
![Build Status](https://github.com/kojix2/youplot/workflows/test/badge.svg) <hr>
[![Gem Version](https://badge.fury.io/rb/youplot.svg)](https://badge.fury.io/rb/youplot)
[![Docs Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://rubydoc.info/gems/youplot)
[![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)
[![DOI](https://zenodo.org/badge/283230219.svg)](https://zenodo.org/badge/latestdoi/283230219)
YouPlot is a command line tool for Unicode Plotting working with data from standard stream. ![Build Status](https://github.com/red-data-tools/YouPlot/workflows/test/badge.svg)
[![Gem Version](https://badge.fury.io/rb/youplot.svg)](https://badge.fury.io/rb/youplot)
[![Docs Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://rubydoc.info/gems/youplot)
[![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)
[![DOI](https://zenodo.org/badge/283230219.svg)](https://zenodo.org/badge/latestdoi/283230219)
:bar_chart: Powered by [UnicodePlot](https://github.com/red-data-tools/unicode_plot.rb) YouPlot is a command line tool that draws plots in a terminal.
:bar_chart: Powered by [UnicodePlot](https://github.com/red-data-tools/unicode_plot.rb)
</div>
## Installation ## Installation
@@ -230,8 +233,8 @@ uplot colors
YouPlot is a library under development, so even small improvements like typofix are welcome! YouPlot is a library under development, so even small improvements like typofix are welcome!
Please feel free to send us your pull requests. Please feel free to send us your pull requests.
* [Report bugs](https://github.com/kojix2/youplot/issues) * [Report bugs](https://github.com/red-data-tools/YouPlot/issues)
* Fix bugs and [submit pull requests](https://github.com/kojix2/youplot/pulls) * Fix bugs and [submit pull requests](https://github.com/red-data-tools/YouPlot/pulls)
* Write, clarify, or fix documentation * Write, clarify, or fix documentation
* English corrections by native speakers are welcome. * English corrections by native speakers are welcome.
* Suggest or add new features * Suggest or add new features
@@ -249,7 +252,6 @@ bundle exec rake install # Installation from source code
### Acknowledgements ### Acknowledgements
* [Red Data Tools](https://github.com/red-data-tools) - Technical support
* [sampo grafiikka](https://jypg.net/sampo_grafiikka) - Project logo creation * [sampo grafiikka](https://jypg.net/sampo_grafiikka) - Project logo creation
* [yutaas](https://github.com/yutaas) - English proofreading * [yutaas](https://github.com/yutaas) - English proofreading

View File

@@ -64,7 +64,7 @@ module YouPlot
parser.on('-y', '--ylabel STR', String, 'print string on the far left of the plot') do |v| parser.on('-y', '--ylabel STR', String, 'print string on the far left of the plot') do |v|
params.ylabel = v params.ylabel = v
end end
parser.on('-w', '--width INT', Integer, 'number of characters per row') do |v| parser.on('-w', '--width INT', Numeric, 'number of characters per row') do |v|
params.width = v params.width = v
end end
parser.on('-h', '--height INT', Numeric, 'number of rows') do |v| parser.on('-h', '--height INT', Numeric, 'number of rows') do |v|
@@ -118,7 +118,7 @@ module YouPlot
Program: YouPlot (Tools for plotting on the terminal) Program: YouPlot (Tools for plotting on the terminal)
Version: #{YouPlot::VERSION} (using UnicodePlot #{UnicodePlot::VERSION}) Version: #{YouPlot::VERSION} (using UnicodePlot #{UnicodePlot::VERSION})
Source: https://github.com/kojix2/youplot Source: https://github.com/red-data-tools/YouPlot
Usage: uplot <command> [options] <in.tsv> Usage: uplot <command> [options] <in.tsv>
@@ -171,13 +171,13 @@ module YouPlot
def sub_parser_add_xlim def sub_parser_add_xlim
sub_parser.on_head('--xlim FLOAT,FLOAT', Array, 'plotting range for the x coordinate') do |v| sub_parser.on_head('--xlim FLOAT,FLOAT', Array, 'plotting range for the x coordinate') do |v|
params.xlim = v params.xlim = v.map(&:to_f)
end end
end end
def sub_parser_add_ylim def sub_parser_add_ylim
sub_parser.on_head('--ylim FLOAT,FLOAT', Array, 'plotting range for the y coordinate') do |v| sub_parser.on_head('--ylim FLOAT,FLOAT', Array, 'plotting range for the y coordinate') do |v|
params.ylim = v params.ylim = v.map(&:to_f)
end end
end end

View File

@@ -1,5 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
module YouPlot module YouPlot
VERSION = '0.4.1' VERSION = '0.4.2'
end end

View File

@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.summary = 'A command line tool for Unicode Plotting' spec.summary = 'A command line tool for Unicode Plotting'
spec.description = 'A command line tool for Unicode Plotting' spec.description = 'A command line tool for Unicode Plotting'
spec.homepage = 'https://github.com/kojix2/youplot' spec.homepage = 'https://github.com/red-data-tools/YouPlot'
spec.license = 'MIT' spec.license = 'MIT'
spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0') spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')