sumo
sumo copied to clipboard
Feature request: `title` attribute: methods in `tools/visualization`
Feature request:
- Adding a
titleargument to the plotting methods that use matplotlib, by using the following code segment to enhance the plots:
plt.title(given_title)
- For example,
Linear graphin
- To maintain compatibility with the existing code, a default title (
None) will be kept in the argument parsing routine.
If this seems like a good idea, please assign me to the same.
Thanks, Vijay
the visualization helpers already have --title and plotXMLAttributes has --label. Which tools do you have in mind?
I wish to add this in all files that use matplotlib for rendering plots, and do not use the helpers' label attributes.
More specifically, in:
plot_csv_bars.py(~Lines 113, 124)plot_csv_timeline.py(~Line 91 -labelis different totitlein matplotlib)plot_net_trafficLights.py(~Line 87)plotXMLAttr.py(~Line 52)
Maybe they could use the visualization helpers to avoid duplicate code?
Thanks for the feedback and apologies for not working on this issue for some time. I have added a PR that corresponds to this issue, please check it out.
The Notes section of the write-up addresses your comment.
Since title is available in the first three tools you mentioned and plotXMLAttr.py is deprecated and will be replaced by plotXMLAttributes, I propose to close this one as won't fix. @vijay-jaisankar Do you agree?
Yes, I agree that this is the right step as the feature is covered in the existing code :)
Thanks for deprecating plotXMLAttr.py, it was very confusing as the functionality was very similar to that of plotXMLAttributes.py and caused a lot of confusion.