question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The return value of plot methods

See original GitHub issue

This 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 from EmbeddingSet
  • plot from Embedding

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:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
koaningcommented, Aug 14, 2020

If I’m honest, I think the library doesn’t have that many users yet. Here’s the views for the relevant documentation page;

image

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.

0reactions
koaningcommented, Mar 4, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found