Open brianfeld-esd opened 3 months ago
Behind the scenes, iplot
is simply calling R's base plotting logic. The automatic selection of axes ticks is governed by par("lab")
. Per the docs:
lab:
A numerical vector of the formc(x, y, len)
which modifies the default way that axes are annotated. The values ofx
andy
give the (approximate) number of tickmarks on the x and y axes andlen
specifies the label length. The default isc(5, 5, 7)
.len
is unimplemented in R.
So one option would be to increase the x
default, e.g.
op = par(lab = c(10,5,7))
iplot(...)
par(op) # reset the original params
If you would prefer a more controlled approach, then you could manually configure /override the x axis. See here for example.
Finally, you could look at at ggfixest
if you'd be more comfortable configuring a ggplot2
implementation rather than base plots.
Not sure if this is a bug (probably not), but when I call iplot to plot the estimates of an event study model, only the even periods are marked in the x-axis. Is there a straightforward way of including all period markers?