TL;DR - is there a way to control the width of the legends area on a ViVA graph window and also to control the widths of the individual columns?
I often do things like this in ocean scripts that are designed to run a bunch of sims, generate plots, and leave some PNG or EPS files for me. In very simplified terms, stuff like this:
;; iterate over corners or configs
;; run sim, grab a result and then
plot(some_signal ?expr '("my_signal:cornerX:configY")
The problem I often run into is that the legend area on the left of the graph window often isn't quite wide enough to show the full legend. In the simple code above "my_signal:cornerX:configY" is fairly long and by default will get cut off. If I'm running interactively, I can manually adjust how much of my window is used by the legend versus the graph and also the width of the "Name" column in the legend area. For example:
default, note the legend is cut off.
after manually expanding the area on the left, but I went further than optimal and exposed the "Vis" column too:
example of a wide enough area on the left but too narrow "Name" column (plus "Vis") is still there:
and finally "Just Right"
What I see is any of these manual adjustments do find their way into the output of saveGraphImage() and I really would love my generated files to be "Just Right" and not the various others (cut off or with wasted space). Since I often run sims in a fairly automated way, manual graph tweaks are really not welcome.
I don't think there's a "just right" option, but there is at least this: awvSetLegendWidth(currentWindow() 400)
Thanks Andrew. It isn't perfect but better than nothing for sure. Much appreciated. For anyone else reading this thread, it appears IC617 ISR15 is when awvSetLegendWidth() appeared.