You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<...data...> | uplot bar -c blue -t "sindresorhus/awesome" --xlabel "commits (last 12m)"
to generate a bar chart like this:
In this case, the X value will always be an integer. Any way to drop that .0 and display it as a whole number? Or remove the label altogether and just print an x-axis at the top or bottom?
The text was updated successfully, but these errors were encountered:
Thank you for your suggestion to display bar labels as integers or no labels at all.
Current Status and Background
YouPlot is a simple wrapper for UnicodePlot.rb, slightly processing the standard input and calling UnicodePlot.rb. The Ruby language implementation of UnicodePlot is inspired by UnicodePlot.jl of the Julia language.
The following code in UnicodePlot displays the labels on the bar chart.
If bar is an Integer, then bar_lbl will be a String of Integer, and if it is a Float number, then bar_lbl will be a String of Float. And there appears to be no conditional branch that does not display bar_labl. There does not seem to be an option here to show or not show bar_labl.
labels as integers
Currently YouPlot assume that all inputs are Float. There are two ways of thinking about automatic recognition. The first is the idea that any string that does not have a decimal point is considered an integer. The second is the idea that after all inputs are received, it is considered an integer only if after all inputs are received, all of them are integers. For manual recognition, a new option must be set.
Do not show labels option
If you consider the option of not displaying labels at all, you will need to make some changes to UnicodePlot. And it must be consistent with UnicodePlot.jl.
Unfortunately I don't have much time for OSS these days. If anyone would like to help me improve UnicodePlot, I would appreciate it.
I'm using the following command (example)
to generate a bar chart like this:
In this case, the X value will always be an integer. Any way to drop that
.0
and display it as a whole number? Or remove the label altogether and just print an x-axis at the top or bottom?The text was updated successfully, but these errors were encountered: