Comments (2)
As you'll note, length(c.lines) == 2
. You'll get the other branch if you do xs2, ys2 = coordinates(c.lines[2])
and plot them too :)
More generally, contour lines will be traced either in loops or reaching the domain boundaries, and each continuous curve will be returned as a separate Curve2
object in c.lines
.
Plotting this example again (with Gadfly
this time, since I don't have matplotlib
on this computer):
x = -3:0.01:3
y = -3:0.01:3
z = [Float64((xi^2 - yi^2)) for xi in x, yi in y];
h = 2
using Contour
c = contour(x,y,z,h)
using Gadfly
plot([layer(x=xs,y=ys,Geom.path) for (xs,ys) in map(coordinates, c.lines)]...)
shows both branches.
(If you want to use Gadfly for plotting, this is built-in there, so you don't have to worry about the Contour package at all if plotting is all you want to do.)
from contour.jl.
Thank you!
It is probably going to benefit everyone if you add your example to the readme.md file of the package.
from contour.jl.
Related Issues (20)
- Upgrade error HOT 5
- Broken on Julia 0.4 HOT 5
- Ambiguity warnings on 0.4
- Broken on 0.4 master HOT 5
- Build contours from irregular and unsorted data HOT 1
- Provide a type-agnostic API and document it HOT 10
- Disable CI builds on OSX?
- Help wanted! HOT 6
- Error tagging new release
- accept non-float z
- Performance Improvements and New Algorithms HOT 3
- display() error HOT 1
- Tests depend on hasing algorithm in Base HOT 2
- TagBot trigger issue HOT 15
- Extracting the indices of the contour HOT 5
- Contour line from specific point HOT 2
- v0.6.0 Documentation Updates
- `contour` fails on arrays of integers HOT 2
- Contours of discntinuous data 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 contour.jl.