Open RustemB opened 4 years ago
Yes, and yes. It does however require that Gnuplot is installed (and found in path).
You can either use to the plot() function, or File->Plot Functions/Data (in the GUI).
plot function documentation:
Plot Functions and Vectors
plot(Expression or vector[, Minimum x value][, Maximum x value][, Number of samples / Step size][, X variable][, Use step size][, Persistent])
Plots one or more expressions or vectors. Use a vector for the first argument to plot multiple series. Only the first argument is used for vector series. It is also possible to plot a matrix where each row is a pair of x and y values.
Example: plot([x^2, 2x, [0,1,4,8,16]], 0, 4).
Arguments.
- Expression or vector: a free value
- Minimum x value: a real number (optional, default: 0)
- Maximum x value: a real number (optional, default: 10)
- Number of samples / Step size: a free value (optional, default: 1001)
- X variable: an unknown variable/symbol (optional, default: x)
- Use step size: a boolean (0 or 1) (optional, default: 0)
- Persistent: a boolean (0 or 1) (optional, default: 0)
Requirement. "Minimum x value" < "Maximum x value"
But it's opens me GUI gnuplot, and i want "ascii-ish" inside of terminal, 'cuz it looks weird for me
i want "ascii-ish" inside of terminal
That is currently not possible (and will likely never be—an ascii plot would not be very useful because of the low resolution).
sadly :(
Actually, gnuplot itself supports ASCII output using set terminal dumb ...
:
The dumb terminal driver plots into a text block using ascii characters. It has an optional size specification and a trailing linefeed flag.
Maybe it is not that difficult to implement? And maybe it's not that useless if gnuplot has this feature?
Maybe it is not that difficult to implement?
echo "set term dumb" >> ~/.gnuplot
should be enough.
And maybe it's not that useless if gnuplot has this feature?
To me, this output appears close to useless:
There are projects that use Braille symbols to make plots in the terminal, eg https://github.com/sunetos/TextPlots.jl https://github.com/asciimoo/drawille :woman_shrugging:
On that note, the upcoming gnuplot 5.5 (not yet packaged in my distro) has added the block terminal, which uses that trick. There's also the sixelgd terminal, which has been around longer and is somewhat more capable but less compatible (doesn't work in tmux, for example).
With set term sixelgd truecolor size 480,280 font "sans,8"
in ~/.gnuplot it looks like
Is it (or will) possible to plot graphs inside terminal session?
Will it be possible to plot graphs inside GUI version of qalculate?