The return value of plot methods
See original GitHub issueThis is partly relevant to #127.
Currently, the following methods return a reference to the plot objects:
plot_interactive_matrix
plot_interactive
plot_movement
However, the following methods either return None
or self
:
plot_pixels
plot_correlation
plot_graph_layout
plot
fromEmbeddingSet
plot
fromEmbedding
Isn’t it better that the methods in the latter group also return a reference to the plot object? This makes them all have similar interface, as well as gives the user the ability to tune the plot object further if desired (although, the methods in the second group use matplotlib
and therefore the plots could be customized with plt.the_relevant_function(...)
as well).
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Return plot from R function - Stack Overflow
You don't need return if you're calling from the top level (i.e., from the console). If you want to display the plot, just...
Read more >How to have a function return a figure in Python (using ...
Call plot(x, y) method and store the figure instance in a variable, f. To display the figure, use show() method. Example. import numpy...
Read more >Plotting and returning values from within a function
I am trying to call a plotting function and return a value from another function ( plot_and_return_points(x,y) ):. function plot_stuff(x, y)
Read more >2-D line plot - MATLAB plot - MathWorks
This MATLAB function creates a 2-D line plot of the data in Y versus the corresponding values in X.
Read more >pandas.DataFrame.plot — pandas 1.5.2 documentation
New in version 1.0.0. Options to pass to matplotlib plotting method. If the backend is not the default matplotlib one, the return value...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If I’m honest, I think the library doesn’t have that many users yet. Here’s the views for the relevant documentation page;
In 60 days maybe 100 people looked at it? That’s maybe two people a day? Assuming they don’t 100% fully read and instead just glance I’d say it may be not be the worst of worst things to happen. But we shouldn’t have breaking changes often.
As long as we update the docs immediately I think I can live with it.
I’m closing issues because ever since the project moved to my personal account it’s been more into maintenance mode than a “active work” mode.