ndlib icon indicating copy to clipboard operation
ndlib copied to clipboard

viz.title not working

Open ggrrll opened this issue 7 years ago • 2 comments

Hi,

I am able to set the ylabel with something like viz.ylabel = 'nodes fraction' , but the equivalent for the title does not work ... viz.title = 'some_title' -- basically the title still gives me the info in model.params['model']

thanks

ggrrll avatar Dec 06 '18 10:12 ggrrll

The issue is tied to the rationale discussed in issue #60.

The plot method takes care of generating the labels starting from models metadata. Since such method either (1) save the plot on file or (2) visualize the final image, until it is called the axis labels (as well as figure title) are not set. Currently, to ensure the use of model metadata, this mechanism prevents from reassign such values.

GiulioRossetti avatar Dec 06 '18 10:12 GiulioRossetti

The branch mpl_viz_refactoring implements a modified version of the mpl plotting submodule in which plot() methods return a Figure object. Please test it and let me know if a similar solution suits your needs.

GiulioRossetti avatar Dec 07 '18 15:12 GiulioRossetti