<div dir="ltr">Pessoal o objetivo é a formatação dos valores que aparecem no eixo (y) e nos valores acima das barras do gráfico de barras.<div><br></div><div>Objetivo dos valores aparecer em 2 formatos como segue:</div><div>-> formatação 1 (br): 1.998,87</div><div>-> formatação 2 (en): 1,998.87</div><div><br></div><div>Segue o código:</div><div><br><div><div>soma <- matrix(c(1998.869,2650.337), nrow = 1,ncol = 2)</div><div><br></div><div># formatação 1 (br)</div><div>barplot(soma, main = "Lucratividade (br)", ylim= c(0, (max(soma[1,1], soma[1,2])) + 1000), xlab = "", ylab = "Lucratividade, R$", names.arg = c("Método T","Método BT"), col=c("red","darkgreen"), beside=TRUE, axes = FALSE)</div><div>text(1.5,soma[1,1]+500, round(soma[1,1],2)) # T</div><div>text(3.5,soma[1,2]+500 , round(soma[1,2],2))  # BT</div><div>axis(side = 2, at = axTicks(2), labels=formatC(axTicks(2), format="d", big.mark='.', digits = 2))</div><div><br></div><div># formatação 2 (en)</div><div>barplot(soma, main = "Lucratividade (en)", ylim= c(0, (max(soma[1,1], soma[1,2])) + 1000), xlab = "", ylab = "Lucratividade, R$", names.arg = c("Método T","Método BT"), col=c("red","darkgreen"), beside=TRUE, axes = FALSE)</div><div>text(1.5,soma[1,1]+500, round(soma[1,1],2)) # T</div><div>text(3.5,soma[1,2]+500 , round(soma[1,2],2))  # BT</div><div>axis(side = 2, at = axTicks(2), labels=formatC(axTicks(2), format="d", big.mark=',', digits = 2))</div></div><div><br clear="all"><div>Obrigado desde já</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Marcio B.<div><div><br></div><div>Cel.: (55 19) 996.483.949 tim  | 997.980.104 vivo<br></div><div><div>skype: maborbaa<br></div></div></div><div><a href="http://www.linkedin.com/in/marciobar" target="_blank">http://www.linkedin.com/in/marciobar</a>
</div><div><a href="https://www.facebook.com/marciobar" target="_blank">https://www.facebook.com/marciobar</a></div><div><br></div><div>Empresa<br><a href="http://www.techagr.com/" target="_blank">http://www.techagr.com/</a><br></div><div><br></div><div>==== PAZ E BEM ====</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div>