holoviz / holoviz/hvplot

Simple method for column transformations before plotting.

Open
#497 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

Hello,

I often need to plot slightly different versions of my data depending on who’s requesting data from me. I was hoping for a simple way of transforming columns such that I don’t have to keep altering my dataframes for every plot.

Here's an example use case:

Original Plot: _probability_ as a **decimal**
```
demo_df = pd.DataFrame({‘value’:np.random.randn(50),‘probability’:np.random.rand(50)})
demo_df.hvplot.scatter(x=‘value’,y=‘probability’)
```
![image](https://user-images.githubusercontent.com/59697435/88718208-3c8b3400-d0e7-11ea-95a8-97b86fd9e278.png)

____________________________________

Desired: plotting the _probability_ as a **percentage** instead.
Something like this might be nice:
```
percent = hv.dim(‘probability’)*100
demo_df.hvplot.scatter(x=‘value’,y=percent,ylabel='probability_as_percentage')
```
![image](https://user-images.githubusercontent.com/59697435/88718625-b7544f00-d0e7-11ea-96d5-eeea61c158f2.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.