문제

I want to have multiple line label for my barplot. I have been using str_replace() to replace all the whitespace into \r\n or \n but none of it works. The label did not break into multiple lines.

Did anyone know how to make it right?

도움이 되었습니까?

해결책

Ok, I have solved it, it is just some syntax error.

instead of str_replace(' ', '\n', str)

i should use str_replace(' ', "\n", str)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top