Closed z-m-k closed 10 years ago
I wonder if there is another way to workaround the inconsistent width of the Braille blank without using the gridlines. Maybe one of these consistently matches the proper width?
In a monospaced font, when would the width ever be inconsistent? What font are you using? I think it's safe to say that TextPlots is pretty dependent on a monospaced font.
Source Code Pro/Consolas. I think it is a Windows thing, though.
Even the regular space character is sized incorrectly in your screenshots: the axis label (max x value) in the bottom-right is normally right-aligned with the edge of the graph, but it extends further right in your screenshot. I'm not sure how that's possible with a monospaced font.
Either way, thanks for the pull request! I can't see any reason not to support these parameters. I hope you don't mind that I rewrote it to be quite a bit shorter, and fixed 2 bugs I found:
I will update the version in METADATA.jl in a day or so with this addition after making sure no bugs pop up. You can test it with Pkg.clone("https://github.com/sunetos/TextPlots.jl/").
Nice. I will admit it took me some time to actually figure out what is going on there, and since I assumed this might be localized to my machine only, it felt stupid just to complain something is not working without proposing a way to fix it. It does feel silly how little you changed compared to the original code to get the same/better effect than after what I did.
Two switches in the
plot()
function which allow to:gridlines=true
invert=true
It comes in handy if Braille blank,
0x2800
, has different width than the remaining characters in the range.Example without gridlines:
Example with gridlines: