# Set major and minor ticks

**URL:** <https://discourse.julialang.org/t/set-major-and-minor-ticks/55930>\
**Category:** New to Julia\
**Tags:** plotting\
**Created:** [February 24, 2021, 12:55pm UTC](https://discourse.julialang.org/t/set-major-and-minor-ticks/55930 "2021-02-24T12:55:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaim\_Awang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zaim_awang/32/20491_2.png) [@Zaim\_Awang](https://discourse.julialang.org/u/Zaim_Awang)\
**Post date:** [February 24, 2021, 12:55pm UTC](https://discourse.julialang.org/t/set-major-and-minor-ticks/55930/1 "2021-02-24T12:55:01Z")

</div>

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.

![image](https://global.discourse-cdn.com/julialang/original/3X/7/8/78bc46848dd0e68344c269a03c93c5fa1280d12f.png)

> using IterableTables  
> using DataFrames  
> using CSV  
> using Dates  
> using Plots
> 
> myfile=“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
