Comments (5)
It is always helpful to post the code that lead to this issue, and maybe even the error message :)
from dynamicalbilliards.jl.
plot(big.(rand(10)))
works in PyPlot, so I don't see a reason that plotting shouldn't work. I'll look at this more once you've pasted the code that lead to the issue.
from dynamicalbilliards.jl.
Oh, sorry, I assumed this was a known problem. Here is the code:
julia> using DynamicalBilliards
julia> using PyPlot
WARNING: using PyPlot.axes in module Main conflicts with an existing identifier.
julia> bd = billiard_rectangle(BigFloat(2),BigFloat(2))
Billiard{BigFloat} with 4 obstacles:
Bottom wall
Right wall
Top wall
Left wall
julia> plot(bd)
ERROR: PyError ($(Expr(:escape, :(ccall(#= /home/yakir/.julia/packages/PyCall/0jMpb/src/pyfncall.jl:44 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'TypeError'>
TypeError("ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''",)
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 1605, in xlim
ret = ax.set_xlim(*args, **kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/axes/_base.py", line 2904, in set_xlim
left, right = mtransforms.nonsingular(left, right, increasing=False)
File "/usr/lib/python3/dist-packages/matplotlib/transforms.py", line 2773, in nonsingular
if (not np.isfinite(vmin)) or (not np.isfinite(vmax)):
Stacktrace:
[1] pyerr_check at /home/yakir/.julia/packages/PyCall/0jMpb/src/exception.jl:60 [inlined]
[2] pyerr_check at /home/yakir/.julia/packages/PyCall/0jMpb/src/exception.jl:64 [inlined]
[3] macro expansion at /home/yakir/.julia/packages/PyCall/0jMpb/src/exception.jl:84 [inlined]
[4] __pycall!(::PyCall.PyObject, ::Ptr{PyCall.PyObject_struct}, ::PyCall.PyObject, ::Ptr{Nothing}) at /home/yakir/.julia/packages/PyCall/0jMpb/src/pyfncall.jl:44
[5] _pycall!(::PyCall.PyObject, ::PyCall.PyObject, ::Tuple{BigFloat,BigFloat}, ::Int64, ::Ptr{Nothing}) at /home/yakir/.julia/packages/PyCall/0jMpb/src/pyfncall.jl:22
[6] _pycall!(::PyCall.PyObject, ::PyCall.PyObject, ::Tuple{BigFloat,BigFloat}, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/yakir/.julia/packages/PyCall/0jMpb/src/pyfncall.jl:11
[7] #pycall#88(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::PyCall.PyObject, ::Type{PyCall.PyAny}, ::BigFloat, ::Vararg{BigFloat,N} where N) at /home/yakir/.julia/packages/PyCall/0jMpb/src/pyfncall.jl:86
[8] pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::BigFloat, ::Vararg{BigFloat,N} where N) at /home/yakir/.julia/packages/PyCall/0jMpb/src/pyfncall.jl:86
[9] #xlim#137(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::BigFloat, ::Vararg{BigFloat,N} where N) at /home/yakir/.julia/packages/PyPlot/fZuOQ/src/PyPlot.jl:179
[10] xlim at /home/yakir/.julia/packages/PyPlot/fZuOQ/src/PyPlot.jl:176 [inlined]
[11] #plot#85(::PyCall.PyObject, ::Function, ::Billiard{BigFloat,4,NTuple{4,InfiniteWall{BigFloat}},Nothing}) at /home/yakir/.julia/packages/DynamicalBilliards/pQCBP/src/plotting/billiards.jl:46
[12] plot(::Billiard{BigFloat,4,NTuple{4,InfiniteWall{BigFloat}},Nothing}) at /home/yakir/.julia/packages/DynamicalBilliards/pQCBP/src/plotting/billiards.jl:39
[13] top-level scope at none:0
from dynamicalbilliards.jl.
So since we will be almost certainly porting plotting of this package to Makie I won't be spending time solving this. But I'll keep it open for reference, to be sure that this is tested when we go to makie!
from dynamicalbilliards.jl.
Makie converts internally to Float32, so BigFloats won't be as useful there. Still, it is possible.
from dynamicalbilliards.jl.
Related Issues (20)
- simple function that returns transmission and refraction of given refractive index HOT 2
- Implent collision with MagneticParticle and Ellipse
- Direct computation of evolution timeseries HOT 3
- Broken documentation link
- Glue HOT 4
- Add "order of 1" note
- A few missing shapes HOT 4
- Adding absorption HOT 4
- Make the speed of the particle dependent on the refractive index of the medium HOT 3
- Include the reflection rule as a field of a new wall/disk object HOT 1
- Add automatic normal for Walls
- Error tagging new release
- Fresnel laws for curved surfaces HOT 4
- [FR] : polygon billiard from vertices HOT 1
- timeseries! is clearly wrong for default dt=Inf ! ! ! HOT 2
- Update to static arrays 0.12
- Simplification and unification of source code: evolve conditionally and collect data?
- TagBot trigger issue HOT 5
- bdplot not defined 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 dynamicalbilliards.jl.