Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time xlims error: type Nanosecond has no field periods #5034

Open
PharmCat opened this issue Nov 26, 2024 · 0 comments
Open

Time xlims error: type Nanosecond has no field periods #5034

PharmCat opened this issue Nov 26, 2024 · 0 comments
Labels

Comments

@PharmCat
Copy link

Try to plot this

using Plots, Dates
y = rand(100)
x = Time(8, 0) .+ Minute.(0:99)
plot(x,y, xlims = (Time(8,30), Time(8,40)))

and have

ERROR: type Nanosecond has no field periods
Stacktrace:
  [1] getproperty(x::Nanosecond, f::Symbol)
    @ Base .\Base.jl:38
  [2] attr!(::Plots.Axis; kw::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:lims, :formatter), Tuple{Tuple{Time, Time}, typeof(RecipesPipeline.timeformatter)}}})

Backends

gr (default)

julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 32 × AMD Ryzen 9 5950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
  Threads: 16 on 32 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 16

Plots.jl version:

⌃ [91a5bcdd] Plots v1.40.7

@PharmCat PharmCat added the bug label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant