plotters-rs / plotters

A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely 🦀 📈🚀
https://plotters-rs.github.io/home/
MIT License
3.88k stars 281 forks source link

[BUG] New lines don't show up in axes labels (x_label_formatter) #353

Closed TheQuantumPhysicist closed 2 years ago

TheQuantumPhysicist commented 2 years ago

Describe the bug When I format with \n or use literals with a new line, I expect to see the new line in the plot text.

New lines are important to be able to put more ticks on the graph that uses dates. Otherwise the x-axis labels easily gets cluttered, and y-axis becomes too wide.

To Reproduce Try to add a new line here in the formatter. It'll be ignored: https://github.com/plotters-rs/plotters/blob/f9985dbc47e047290da7693609ccd3e966eeaa68/examples/chart.rs#L25

Version Information Rust's crates.io's version 0.3.1

facorread commented 2 years ago

Duplicate of #113