Comments (7)
No.
import numpy as np
from matplotlib import pyplot as plt
a = np.arange(10.)
a[2:5] = [np.nan] * 3
plt.plot(a)
plt.show()
from uniplot.
@Freed-Wu Thanks for the suggestion! I guess what you would want is that when plotting NaN's are silently dropped, right?
So plot([1,2,3])
should be itentical to plot([1,2,3,np.nan])
, right?
from uniplot.
Okay got it, I'll look into it. Might be that I'll only get around to the simpler option of the above.
Let me know if you want to have a go at this yourself, and we'll coordinate
from uniplot.
Not sure. I notice another library named plotext has same problem, however, it only ignore NaN (the simpler option of the above). I maybe try to solve piccolomo/plotext#114
from uniplot.
@Freed-Wu It sounds like you have another solution now. In any case I've implemented the simple version we discussed in 0.6.0
and maybe I'll get around to the more sophisticated one eventually.
Thank you for your input!
from uniplot.
You are welcome. 😄
from uniplot.
This should now work as requested. 😄
>>> import numpy as np
>>> from uniplot import plot
>>> a = np.arange(10.)
>>> a[2:5] = [np.nan] * 3
>>> plot(a, lines=True)
┌────────────────────────────────────────────────────────────┐
│ ▗▄▀▀│
│ ▄▞▀▘ │ 8
│ ▗▄▀▀ │
│ ▄▞▀▘ │
│ ▗▄▀▀ │
│ ▄▞▀▘ │
│ ▗▄▀▀ │
│ ▞▀▘ │
│ │
│ │ 4
│ │
│ │
│ │
│ │
│ │
│ ▗▄▞▀ │
│▄▄▀▘▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁│ 0
└────────────────────────────────────────────────────────────┘
2 5 7 10
from uniplot.
Related Issues (20)
- Occasional gaps in lines HOT 2
- Missing precision on x axis values, making them identical HOT 3
- [Question] Does Uniplot Support .py files? HOT 2
- Requesting Support for Plotting Line Graphs HOT 6
- Support for using datetime values for x axis labels HOT 11
- Fill area under curve HOT 1
- Get a plot as a string HOT 6
- Incorrect centering of labels with units
- Feature request: Boxplot HOT 3
- Suggestion for speeding up large data HOT 6
- Incorrect axis labels in rare cases
- Manually set view bounds do not work correctly with log flags
- Label choice does not always seem optimal HOT 1
- Support for using datetime values for y axis labels
- Configurable move / zoom keys HOT 4
- Histogram x-axis range ignored HOT 3
- Missing link to repository on PyPI page HOT 3
- Use different characters instead of colors HOT 2
- plot fails when multiseries is provided with empty list HOT 2
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 uniplot.