Date formats x-axis

Hi, I’m trying to get my date format to display three character abbreviated month, but I’m having no luck. Feel like I’m just missing a minor something here:

region = [clim_mean.index[0].strftime("%Y-%m-%d"),
          clim_mean.index[-1].strftime("%Y-%m-%d"),
          0, 1000]
projection = f"X20c/15c"
frame = ["WS", "sxa1Of10D", "pxa1o", "sy+lFIA (1000-km^2)"]#, "pya1+ucm"]
print(region)
pygmt.config(MAP_FRAME_TYPE          = "plain",
             FONT_TITLE              = "18p,Helvetica-Bold",
             FONT_LABEL              = "20p,Helvetica",
             FONT_ANNOT_PRIMARY      = "20p,Helvetica",
             MAP_TICK_LENGTH_PRIMARY = "0.1c",
             FORMAT_DATE_MAP         = "o",
             FORMAT_DATE_OUT         = "o",
             FORMAT_TIME_PRIMARY_MAP = "c")
fig = pygmt.Figure()
fig.basemap(region=region, projection=projection, frame=frame)
fig.plot(x            = np.concatenate([clim_min.index, clim_max.index[::-1]]),
         y            = np.concatenate([clim_min.values, clim_max.values[::-1]]),
         fill         = f"{line_color}@80",
         close        = True,
         transparency = 60,)
fig.plot(x     = clim_mean.index,
         y     = clim_mean.values,
         pen   = f"2p,{line_color}",
         label = f"{leg_lab}")
fig.legend(position="JTL+jTL+o0.2c+w20c", box=True)
fig.show()

resolved own issue …

it was where I was calling pygmt.config()

   def plot_timeseries_groupby_doy(self, ts_dict,
                                    primary_key : str = "FIA",
                                    roll_days   : int   = None,
                                    tit_str     : str   = None,
                                    ylim        : tuple = None,
                                    ylabel      : str   = "Fast Ice Area (1000-km²)",
                                    ytick_inc   : int   = 100,
                                    xlabel      : str   = "Date",
                                    xtick_inc   : int   = 1,
                                    P_png       : str   = None,
                                    fig_width   : str   = "30c",
                                    fig_height  : str   = "10c",
                                    legend_pos  : str   = "JBR+jBR+o0.2c",
                                    pen_weight  : str   = "1p",
                                    time_coord  : str   = "time",
                                    keys2plot   : list  = None,
                                    show_fig    : bool  = None):
        """
        """
        dfs = []
        fake_year = 1996
        region = [f"{fake_year}-01-01", f"{fake_year}-12-31", 0, 1000]
        projection = f"X{fig_width}/{fig_height}"
        frame = ["WS", "pxa1O", f"sy+l{ylabel}"]#, "pya1+ucm"]  "sxa1Of30D",
        fig = pygmt.Figure()
        with pygmt.config(MAP_FRAME_TYPE          = "plain",
                          FONT_TITLE              = "18p,Helvetica-Bold",
                          FONT_LABEL              = "20p,Helvetica",
                          FONT_ANNOT_PRIMARY      = "20p,Helvetica",
                          MAP_TICK_LENGTH_PRIMARY = "0.1c",
                          FORMAT_DATE_MAP         = "o",
                          FORMAT_DATE_OUT         = "o",
                          FORMAT_TIME_PRIMARY_MAP = "a"):
            fig.basemap(projection=projection, region=region, frame=frame)
            for i,(dict_key,data) in enumerate(ts_dict.items()):
                if dict_key=='AF2020':
                    da = data
                else:
                    da = data[primary_key]
                df         = pd.DataFrame({"time": pd.to_datetime(da["time"].values), 
                                        "data": da.values})
                df["doy"]  = df["time"].dt.dayofyear
                df["year"] = df["time"].dt.year
                doy_grp    = df.groupby("doy")["data"]
                clim_min   = doy_grp.min()
                clim_max   = doy_grp.max()
                clim_mean  = doy_grp.mean()
                # Convert DOY index to datetime for use with pygmt
                clim_min.index  = pd.to_datetime(clim_min.index - 1, unit="D", origin=pd.Timestamp(f"{fake_year}-01-01"))
                clim_max.index  = pd.to_datetime(clim_max.index - 1, unit="D", origin=pd.Timestamp(f"{fake_year}-01-01"))
                clim_mean.index = pd.to_datetime(clim_mean.index - 1, unit="D", origin=pd.Timestamp(f"{fake_year}-01-01"))
                line_color      = self.plot_var_dict.get(dict_key,{}).get("line_clr",{})#def_colors[i % len(def_colors])
                fig.plot(x           = np.concatenate([clim_min.index, clim_max.index[::-1]]),
                        y            = np.concatenate([clim_min.values, clim_max.values[::-1]]),
                        fill         = f"{line_color}@80",
                        close        = True,
                        transparency = 60,)
                fig.plot(x     = clim_mean.index,
                        y     = clim_mean.values,
                        pen   = f"2p,{line_color}",
                        label = f"{dict_key}")
        fig.legend(position=legend_pos, box=True)
        fig.show()