Hello, I am making a bar graph of the annual income for districts within each department. I have two problems, (i) when I make the bar graph not all the names of the districts appear and (ii) is there a format so that it does not appear on the x axis :x10 ^ 5 ?
I leave the code with a simulated data.
begin
cantidad=1000
data_1=DataFrame(
distrito=[randstring(4) for i=1:cantidad],
departamento=["Departamento_$i" for i in rand(1:24,cantidad)],
ingreso=[1000000*rand() for i=1:cantidad]
)
end
begin
depa_1 = unique(data_1.departamento)
se_1=depa_1.=>depa_1
md" $(@bind depa_elegido Select(se_1))"
end
begin
data_2=filter(row ->row.departamento==depa_elegido, data_1);
sort!(data_2, [:ingreso]);
end;
begin
plot(data_2.distrito, data_2.ingreso, legend=:false, orientation=:h, seriestype=:bar)
title!("Departamento de $depa_elegido")
xticks!(LinRange(0, maximum(data_2.ingreso), 4))
xlims!(0, maximum(data_2.ingreso))
end