Skip to content

Time axis, including date and hours/minutes/seconds #654

Open
@lazarusA

Description

@lazarusA

Currently if we do, only a date format with year/month/day is shown, which then when zoom-ing is less useful, because we cannot see the hours a those scales. Any workaround ?

using AlgebraOfGraphics, Dates
dates = DateTime("2007-01-01T00:00:00"):Hour(1):DateTime("2010-01-01T00:00:00") |> collect
ts1 = cumsum(randn(length(dates)))
ts2 = cumsum(randn(length(dates)))
df = (; dates, ts1, ts2)
plt = data(df) *
    mapping(:dates, [:ts1, :ts2] .=> "value", color=dims(1) => renamer(["time1", "time2"]) => "series ") * visual(Lines)
draw(plt)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions