Not getting the graph as required
pradeepu1995 opened this issue · comments
Sir, I am searching for a library to draw graph in terminal and I found this library and used this, but the output is not getting as required. Please help out.
The code I used (which is given in readme of your library)
import plotille
import numpy as np
X = np.sort(np.random.normal(size=1000))
fig = plotille.Figure()
fig.width = 60
fig.height = 30
fig.set_x_limits(min_=-3, max_=3)
fig.set_y_limits(min_=-1, max_=1)
fig.color_mode = 'byte'
fig.plot([-0.5, 1], [-1, 1], lc=25, label='First line')
fig.scatter(X, np.sin(X), lc=100, label='sin')
fig.plot(X, (X+2)**2 , lc=200, label='square')
print(fig.show(legend=True))
The output what I got
The actual output (shown in read me)
Why I am getting the extra braille dots
? Please help me. Waiting for your replay.
Thank you.
Hello,
Can you tell me, what OS, python version, plotille version, terminal and font you are using. This will help me reproduce the behavior and find a solution.
Best, Tammo
Thank you for your quick response,
OS - arch Linux (4.12
)
Python version 3.6.2
plotille version 3.4
Terminal - xfce4-terminal (0.8.6
)
Font - Monospace Regular
I am not 100% sure, but I would point to the font for the seen effect: all 8 braille dots are visible and only the selected ones are highlighted. Have a look at the colored characters in the image you provided.
Can you install and use a different font in the terminal. I have good experiences with Inconsolata and Source Code Pro.
Ok sir. I will try and let you know if that worked for me.
If the error persists, please reopen the issue and detail the errors.
I also thought this was a font issue. I am getting this kind of result with Source Code Pro
in VS Code's integrated terminal:
And this with SF Mono
(the default for macOS) in Terminal.app:
Changing the font to SF Mono in VS Code still shows the dots, so it is likely not the font itself, but some other settings.
Both terminals have xterm-256color
as $TERM
.
Hi @slhck,
this still looks like a font issue in the VS Code terminal. Did you set the terminal font to SF Mono or the editor font - they can be set independently:
- "terminal.integrated.fontFamily"
- "editor.fontFamily"