Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Allow users to hide 'uid' and 'from_uid' from the table #34

Closed
kamil-kaczmarek opened this issue Feb 25, 2020 · 15 comments
Closed

Allow users to hide 'uid' and 'from_uid' from the table #34

kamil-kaczmarek opened this issue Feb 25, 2020 · 15 comments
Assignees
Labels
enhancement New feature or request

Comments

@kamil-kaczmarek
Copy link

Hi @danthe3rd,

Thanks for the nice library. Very lightweight, very useful 馃檪

Background
When I have a lot of axes on the parallel plot I always drop uid and from_uid axes, because they add some unnecessary clutter to the chart. I still want to keep these two axes in the table.
In my case I have other axes than encode runs.

Request
Add an option (maybe to the display function) to not display uid and from_uid axes on the chart.

Best,
Kamil

@danthe3rd
Copy link
Contributor

Hi,

There is a hide setting you can use to hide columns in the parallel plot. You can have a look here for an example: https://facebookresearch.github.io/hiplot/experiment_settings.html#frontend-rendering-settings

I hope this helps :)

@kamil-kaczmarek
Copy link
Author

Hey @danthe3rd,

Yes, it solved my problem, thank you.

@bensdm
Copy link

bensdm commented Mar 2, 2020

Is it possible to hide on parallel plot but display on the table below?

@danthe3rd
Copy link
Contributor

Is it possible to hide on parallel plot but display on the table below?

All the columns are always displayed on the table. The hide setting only refers to the parallel plot part.

@bensdm
Copy link

bensdm commented Mar 2, 2020

indeed sorry i made a typo in my code, but is is possible to hide from uid in the columns?

@danthe3rd
Copy link
Contributor

Not yet no. Maybe in a future version :)

@haw230
Copy link

haw230 commented Jul 28, 2020

Just wanted to add I would like this change too! It would make the table a lot cleaner to be able to drop uid and from_uid.

@danthe3rd danthe3rd changed the title Allow users to hide 'uid' and 'from_uid' from the parallel plot Allow users to hide 'uid' and 'from_uid' from the parallel plot / table Jul 28, 2020
@danthe3rd danthe3rd self-assigned this Jul 28, 2020
@danthe3rd danthe3rd added the enhancement New feature or request label Jul 28, 2020
@danthe3rd
Copy link
Contributor

Reopening to track it

@danthe3rd danthe3rd reopened this Jul 28, 2020
@danthe3rd danthe3rd changed the title Allow users to hide 'uid' and 'from_uid' from the parallel plot / table Allow users to hide 'uid' and 'from_uid' from the table Aug 18, 2020
@danthe3rd
Copy link
Contributor

I've just pushed 0.1.19 (you can upgrade with pip install -U hiplot), which adds support for hiding columns in the table.

The documentation contains an example: https://facebookresearch.github.io/hiplot/experiment_settings.html#frontend-rendering-settings. You can now add this to hide the uid and from_uid columns:

exp.display_data(hip.Displays.TABLE).update({
    # Don't display `uid` and `from_uid` columns to the user
    'hide': ['uid', 'from_uid'],
})

@kamil-kaczmarek
Copy link
Author

Great to see this change. Thanks @danthe3rd

@AndyJZhao
Copy link

AndyJZhao commented Jan 24, 2022

Is it possible to hide the "uid" and "from_uid" in the jupyter_notebook? I'm getting the "uid" columns occasionally while plotting with hip.Experiment.from_dataframe(df).display(). See the right-most 'uid' column in the pic below.
image

@GoldenCorgi
Copy link
Contributor

GoldenCorgi commented Jan 24, 2022

@Andy-Border

Is it possible to hide the "uid" and "from_uid" in the jupyter_notebook? I'm getting the "uid" columns occasionally while plotting with hip.Experiment.from_dataframe(df).display(). See the right-most 'uid' column in the pic below.

Does this code below work for you?

exp = hip.Experiment.from_dataframe(df)
exp.display_data(hip.Displays.PARALLEL_PLOT).update({'hide': ['uid']}) # Change ['uid'] to a list of column names to be hidden. E.g. ['uid', 'dropout']
exp.display()

Reference: https://colab.research.google.com/github/facebookresearch/hiplot/blob/main/examples/HiPlotColabExample.ipynb

Should work in Colab and other Jupyter environments

If it doesn't work, do open a new issue, I'll work on it if it's a bug!

@AndyJZhao
Copy link

AndyJZhao commented Jan 24, 2022

@Andy-Border

Is it possible to hide the "uid" and "from_uid" in the jupyter_notebook? I'm getting the "uid" columns occasionally while plotting with hip.Experiment.from_dataframe(df).display(). See the right-most 'uid' column in the pic below.

Does this code below work for you?

exp = hip.Experiment.from_dataframe(df)
exp.display_data(hip.Displays.PARALLEL_PLOT).update({'hide': ['uid']}) # Change ['uid'] to a list of column names to be hidden. E.g. ['uid', 'dropout']
exp.display()

Reference: https://colab.research.google.com/github/facebookresearch/hiplot/blob/main/examples/HiPlotColabExample.ipynb

Should work in Colab and other Jupyter environments

If it doesn't work, do open a new issue, I'll work on it if it's a bug!

Hi GoldenCorgi,
Thanks for your prompt reply and valuable code snippet. It worked馃!
Yet it would be very helpful to drop the "uid" and "from_uid" columns in the table below the plot, Q1. is there any method to achieve this?
Q2. By default, the table is inconveniently sorted by the "uid", which is sorted alphabetically i.e. 1,10,100, etc. (check the pic below), is there any method to pass a sorted_by argument to the table? (instead of manually click on the column title)馃

image

@danthe3rd
Copy link
Contributor

Hi :)

Yes you can do both. The documentation is here

I didn't test it, but this code should work:

exp = hip.Experiment.from_dataframe(df)
exp.display_data(hip.Displays.PARALLEL_PLOT).update({'hide': ['uid']}) # Change ['uid'] to a list of column names to be hidden. E.g. ['uid', 'dropout']
exp.display_data(hip.Displays.TABLE).update({'hide': ['uid']}) # Same here
exp.display_data(hip.Displays.TABLE).update({'order_by': [('lr', 'asc')]}) # Order by LR asc
exp.display()

@AndyJZhao
Copy link

Hi :)

Yes you can do both. The documentation is here

I didn't test it, but this code should work:

exp = hip.Experiment.from_dataframe(df)
exp.display_data(hip.Displays.PARALLEL_PLOT).update({'hide': ['uid']}) # Change ['uid'] to a list of column names to be hidden. E.g. ['uid', 'dropout']
exp.display_data(hip.Displays.TABLE).update({'hide': ['uid']}) # Same here
exp.display_data(hip.Displays.TABLE).update({'order_by': [('lr', 'asc')]}) # Order by LR asc
exp.display()

Thank you mate, this works like a charm 馃 !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants