Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement proposal: create a plot button in variable explorer to visualize numerical data #21743

Closed
dpturibio opened this issue Jan 30, 2024 · 6 comments · Fixed by #21969
Closed

Comments

@dpturibio
Copy link
Contributor

Hello guys, I would like to propose a plot button in variable explorer to visualize numerical data of tables, lists, dataframes, etc as in my group we deal daily with this issue, when we need to understand the meaning of some amount of data in scientific notation for example in a table, that does not make much sense in table format, but so in a graph.
I know we could use "Plots" pane in IPython console or running the code to visualize it, but would be very useful to have this implemented in a button and menu of variable explorer directly.
We did something similar to this in our internal plugin, to plot table files as you can see bellow, so if you agree I can work on this enhancement.
Please let me know your opinion.
graph

@ccordoba12
Copy link
Member

Hey @dpturibio, thanks for reporting. This seems like a good idea to me, thanks for the suggestion!

However, in the screenshot you posted you're showing a menu entry in the context menu of the Projects pane. So, I don't understand very well why you say this should be added to the Variable explorer.

@dpturibio
Copy link
Contributor Author

Thank you for the response @ccordoba12 .
Maybe this image caused confusion... The intention was just to show how a graph of an amount of data is useful(in this context of the image was in Projects Pane) to investigate the meaning of it. But I would like to implement this same behavior for variable explorer as in the bellow image:
Captura de tela de 2024-01-30 20-33-17
Adding an icon to plot a graph for the dataframe type as circled in red.

Clicking this icon will generate a plot in Plots Pane in the same way that the code in the screenshot did, but without the need to program and run this code, but just clicking the button.
Variable explorer already has this functionality for list types.
Captura de tela de 2024-01-30 21-06-21

So I would like to extend this to dataframes and maybe dictionaries.
Let me know what you think about it.

@ccordoba12
Copy link
Member

ccordoba12 commented Feb 2, 2024

Thanks for the clarification @dpturibio. I understand better what you want to do and agree with the idea.

However, you should wait until PR #21666 is merged before proceeding because that pull request will improve the UI for toolbars in all our editors.

@jitseniesen
Copy link
Member

Issue #21025 asks about adding a menu item for plotting histograms to the dataframe editor, so the discussion there may be relevant. As I said there, I made a quick prototype that does that. That was over half a year ago and before @dpturibio's PR #20546 got merged, so the code is no longer be current. But you can still see the commit if you're curious at jitseniesen@05a570c.

@dpturibio
Copy link
Contributor Author

Hi @ccordoba12, as PR #21666 is already merged, can I start with the implementation or are you doing minor changes yet? @jitseniesen, any comments? By the way, thank you for sharing your commit in previous message.

@ccordoba12
Copy link
Member

@dpturibio, you can proceed with the improvements you want to do now.

dpturibio added a commit to dpturibio/spyder that referenced this issue Apr 5, 2024
@ccordoba12 ccordoba12 added this to the v6.0beta1 milestone May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants