I am using plotly and trying to get my dates showing every month but now it is showing every 2 months. I looked at the documentation and tried various attributes as you can see below to no avail. Thanks in advance.
using IterableTables
using DataFrames
using CSV
using Dates
using Plotsmyfile=“DATA_24022021.csv”
dmft = dateformat"d/m/yyyy HH:MM:SS" #originaldateformat
df = DataFrame(CSV.File(joinpath(@DIR,myfile); dateformat=dmft)) #assign dateformat
println(first(df,10))
println()
mindate = df[1,:DATETIME]
maxdate = df[nrow(df),:DATETIME]
minday=string(Dates.day(mindate)); minmonth=string(Dates.month(mindate)); minyear=string(Dates.year(mindate))
minhour=string(Dates.hour(mindate)); minmin=string(Dates.minute(mindate)); minsec=string(Dates.second(mindate))
maxday=string(Dates.day(maxdate)); maxmonth=string(Dates.month(maxdate)); maxyear=string(Dates.year(maxdate))
maxhour=string(Dates.hour(maxdate)); maxmin=string(Dates.minute(maxdate)); maxsec=string(Dates.second(maxdate))
println(“First timestamp. DD/MM/YYYY HH:MM:SS “minday”/“minmonth”/“minyear” “minhour”:“minmin”:”*minsec)
println(“Last timestamp. DD/MM/YYYY HH:MM:SS “maxday”/“maxmonth”/“maxyear” “maxhour”:“maxmin”:”*maxsec)
plotly()
using StatsPlots
@df df plot(:DATETIME, [:DATA1], gridstyle=:dash, xrotation=270, xminorgrid=true, showlegend=false, minorticks=true, gridlinewidth=1)
The data in the csv file looks like this in case it matters.
10/8/2020 0:00,507.28,181.34,1532.96,183.16
10/8/2020 0:01,507.29,181.34,1532.95,183.16
10/8/2020 0:02,507.27,181.34,1532.94,183.16
10/8/2020 0:03,507.28,181.34,1532.97,183.16
10/8/2020 0:04,507.29,181.33,1532.97,183.16
10/8/2020 0:05,507.29,181.33,1532.96,183.16
10/8/2020 0:06,507.27,181.33,1532.95,183.16
10/8/2020 0:07,507.28,181.33,1532.96,183.16