Comments (1)
Hi ThSGM,
thanks for the comment. I tried your code and it worked well on my machine. I would try to tweak the sleeping time in sleep(time)
to adapt it to your machine.
Another thing you could try is to fix the sleeping time to 0 or to a minimum and increase the n_points
till it works (you may have forgotten a pi
in t
).
Also notice that when the plot clears, it clears also all the plot style.
Here is the revised code:
#!/usr/bin/env python3
import plotext.plot as plx
import numpy as np
pi = np.pi
n_points = 50
x = np.linspace(0, 2 * pi, n_points)
y = np.sin(x)
t = np.linspace(0, 2 * pi, n_points)
for tt in t:
plx.clear_plot()
plx.clear_terminal()
y = np.sin(x - tt)
plx.scatter(x, y)
plx.set_cols(100)
plx.set_rows(100)
plx.set_ylim([-1.1, 1.1])
plx.set_xlim([0, 2 * pi])
plx.set_axes_color("green")
plx.set_background("black")
plx.set_spacing([5, 8])
plx.sleep(0.2)
plx.show()
Let me know if you find a way to make it work. All the best.
from plotext.
Related Issues (20)
- Update released version? HOT 6
- `IndexError: list index out of range` at `plotext/_build.py"`, line 261 HOT 2
- Feature Request: Resize with terminal
- Space in staked bar chart if first value is 0
- OSError with Plotext Event Plot on Windows10 HOT 1
- Out of bound on a simple_stacked_bar with more than 19 stacked dataset HOT 4
- Circular import error on plotext attributes HOT 2
- Time format HOT 2
- wide chars(chinese/japanese,etc) overflowed in legend HOT 2
- AttributeError: module 'plotext' has no attribute 'box' HOT 3
- Is it possible to include asciichartpy style like for the Basic plots?
- BUG: `bar` does not recognize numpy strings as strings
- Feature request: Setting a maximum to bar plots HOT 2
- Terminal Output for Docker-Compose HOT 1
- Tickable bar Plot
- Color per label in bar plot
- Color for the scatter plots
- Time Shift Issue: plot Function Displays Time One Hour Off Compared to Bar Graph
- Line-thickness control? HOT 5
- `plotext.show()` with no data changes subsequent plots HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plotext.