final work against #50. There is a little bug i can't fix and that is that labels in legend are cut off