You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But this (the most obvious thing to do) doesn't. My data is in Float64 type.
Guide.xticks(ticks=[1:10])
LoadError: MethodError: no method matching *(::FloatRange{Float64}, ::Measures.Length{:mm,Float64})
Closest candidates are:
*(::Any, ::Any, !Matched::Any, !Matched::Any...) at operators.jl:138
*(::AbstractArray{T,N}, !Matched::Number) at abstractarraymath.jl:97
*(::AbstractArray{T,1}, !Matched::Base.LinAlg.AbstractTriangular{T,S<:AbstractArray{T,2}}) at linalg\triangular.jl:1529
...
I have to use collect() function to get it work:
Guide.xticks(ticks=collect(1:10))
I don't know if I am doing something extremely stupid or there no way to use a range object? Guide me please! (pun intended :-) )
As a feedback, I presume the most common thing people want to do is use xticks to increase or decrease the number of ticks or resolution of the axis. That should be the example case instead of the trivial ticks=[0.1, 0.3, 0.5] as documented here: http://gadflyjl.org/stable/lib/guides/guide_xticks.html#Guide.xticks-1
The text was updated successfully, but these errors were encountered:
Julia no longer automatically expands ranges, see JuliaLang/julia#3737. Try to compare the output of [1:10] and collect(1:10) on v0.5. @Mattriks' way works because it forces expansion of the range.
This works:
Guide.xticks(ticks=[1,2,3,4,5,6,7,8,9,10])
But this (the most obvious thing to do) doesn't. My data is in Float64 type.
Guide.xticks(ticks=[1:10])
I have to use
collect()
function to get it work:Guide.xticks(ticks=collect(1:10))
I don't know if I am doing something extremely stupid or there no way to use a range object? Guide me please! (pun intended :-) )
As a feedback, I presume the most common thing people want to do is use xticks to increase or decrease the number of ticks or resolution of the axis. That should be the example case instead of the trivial
ticks=[0.1, 0.3, 0.5]
as documented here: http://gadflyjl.org/stable/lib/guides/guide_xticks.html#Guide.xticks-1The text was updated successfully, but these errors were encountered: