pygwalker icon indicating copy to clipboard operation
pygwalker copied to clipboard

How to get two coaxial pieces of data to be displayed together instead of divided into two views?

Open jnhzzzk opened this issue 2 years ago • 3 comments

How to get two coaxial pieces of data to be displayed together instead of divided into two views?

Such as a dataset that there is the same X-axis of date but two attribute

jnhzzzk avatar Feb 27 '23 07:02 jnhzzzk

For now, you can make it with pandas APIs.

Suppose we have a dataframe df with fields A, B and date, and now we want an overlay view of A & date and B & date.

To make this, you can use df = df.melt(id_vars='date', value_vars=['A', 'B']) to unpivot A and B into one column , run pyg.walk(df) and then drag the merged 'variable' field onto the color channel to distinguish A and B in the value & date view.

Asm-Def avatar Feb 28 '23 08:02 Asm-Def

Hi, I am interested in contributing to this Issue.

However, I am new to this repository.

I understand the modifications described, but I am not sure where I should write the procedure. Could you please give me a guide here?

d505 avatar Mar 23 '23 09:03 d505

Hi, I am interested in contributing to this Issue.

However, I am new to this repository.

I understand the modifications described, but I am not sure where I should write the procedure. Could you please give me a guide here?

@d505 Sorry for the late reply, I didn't notice this comment. it's now a feature of https://github.com/Kanaries/Graphic-Walker, you can view it here https://github.com/Kanaries/graphic-walker/pull/61

Asm-Def avatar Apr 19 '23 03:04 Asm-Def

Hi there, I think I am having the same issue with a dataset of mine. What I would like to achieve is multiple lines for the same X and Y Axis without creating new plots for each of this "categories". When I try to put this dataset into a single plot with a single attribute for the X-Axis and the Y-Axis and I try to make the distinction of two categories with the Color and the Shape view, the coloring and shaping looks fine but only a single line is plotted.

When I put another item on the X-Axis I get two plots with one line plot in each and this is kind of the plot I would like to have, but in a single plot. Maybe there should be a toggle to select either of those two variants?

I hope this description makes sense, thanks for any help!

Julius-Plehn avatar Jul 18 '23 20:07 Julius-Plehn

This feature is in the draft stage in Graphic-Walker, the developer of Graphic-Walker told me it will be released soon.

longxiaofei avatar Jul 20 '23 15:07 longxiaofei