moneylobster / cl-text-plot

Plot with text in Common Lisp
8 stars 0 forks source link

Use Unicode box drawing chars instead of Braille #1

Open aartaka opened 3 months ago

aartaka commented 3 months ago

Hi!

Seen your comment on Reddit and decided to check the library. While I haven't run any code (don't have samples I need to plot), I see that you're using Braille characters as pseudo graphics.

Please don't do that. Braille is not intended as pretty graphics character set, however tempting it might look for that role—it's intended for Braille screens and printing. Use Unicode box-drawing characters (Wikipedia lists some, but there likely are more, just search for 'em), which are explicitly intended as pseudo-graphics primitives.

Thanks for the library and your work on it, aside for this character issue! I wanted to do such a project myself, but you beat me to it, so cheers!

moneylobster commented 3 months ago

Hey, thanks for the comments!

The braille characters were chosen since they were also the default used in UnicodePlots.jl, and provide a 4x2 grid. The block elements in your link seem like they can be used for a similar purpose albeit at a lower resolution of 2x2. I'll have to check if the sextant 3x2 blocks and the diagonal blocks (under "Symbols for Legacy Computing") are supported in the default console fonts for major systems, but it seems that those along with other unicode symbols can be used to create other display options more expressive than a dot-matrix canvas.

I will try to abstract out the display backend (in a similar manner to the Julia library) and add the 2x2 block drawing characters as an alternative when I get the time. If the resulting plots seem acceptable I will consider making the block characters the default, reserving the braille for cases where a higher resolution may be needed.