Module[{labels = {"1990", "1991", "1992", "1993", "1994", "1995",
"1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003",
"2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011",
"2012", "2013", "2014", "2015", "2016"},
data = {1, 0, 0, 0, 2, 1, 0, 7, 12, 2, 1, 0, 2, 2, 2, 1, 1, 2, 4, 2,
4, 2, 2, 2, 2, 1, 1}},
BarChart[data,
ChartLabels ->
Placed[Sort[
Style[#, FontSize -> Scaled[.016]] & /@ labels], {{0.5, 0}, {0.9,
1}}, Rotate[#, 50 Degree, {Right, Center}] &],
PlotRange -> {Automatic, {0, 13}},
ImagePadding -> {{40, 10}, {95, 10}},
Frame -> {{True, True}, {True, True}},
FrameLabel -> {Style["", FontSize -> 5],
Style["nº de publicaciones", FontSize -> 13]},
FrameTicks -> {{True, None}, {None, None}}]]
I would like to know how can the labels with '0' data be shown. With this code I don't get any label for 1991,1992,... and all other year with '0' data
Thanks in advanced
{{0.5, 0}, {0.9, 1}}
in another set of brackets:{{{0.5, 0}, {0.9, 1}}}
. It would be useful to write in the OP the version you use, as again your code works fine for me under 10.4.1. $\endgroup$ChartLabels
in a histogram $\endgroup$