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

Break axes labels at selection #227

Merged
merged 2 commits into from
Sep 12, 2018
Merged

Conversation

canyon289
Copy link
Member

@canyon289 canyon289 commented Sep 10, 2018

Per at @ahartikainen comments make the labels a little nicer.

Still not great, but for a two character change I think this is moving the labels in the right direction.

I haven't checked all the plots yet but below are examples from pairplot. They're getting cut off a little but If they generally look good I can fix this and check more plots.

hexpairplot_1_
hexpairplot_2_
hexpairplot_3_
hexpairplot_4_
hexpairplot_5_
hexpairplot_6_
hexpairplot_7_
hexpairplot_8_

@ahartikainen
Copy link
Contributor

plt.savefig(..., bbox_inches='tight') is a quick fix, but having plots done with correct size from start is a better approach.

@ahartikainen
Copy link
Contributor

Also, do we have possibility to just use coord name? E.g. school : XYZ --> XYZ?

@canyon289
Copy link
Member Author

I'll use your suggestion and make examples after work today. Thanks!

@canyon289
Copy link
Member Author

Here's what it looks like with just the selection value, and not its key. Are two or more level hierarchies possible and/or common? Is there an example of one we should test out if so?

I still need to fix the problem with the labels getting cut off.

hexpairplot_1_
hexpairplot_2_
hexpairplot_3_
hexpairplot_4_
hexpairplot_5_
hexpairplot_6_
hexpairplot_7_
hexpairplot_8_

@ahartikainen
Copy link
Contributor

Looks good. I think if there are more levels, user probably needs to handle it somehow manually?

Is there a possibility to select which level to use?

@canyon289
Copy link
Member Author

So the user can override the labels because they the axes objects are returned.

I'm sure there's a way to select which level to use, but I don't know how. I can make a multi level example and see what happens.

@ahartikainen
Copy link
Contributor

Sounds good.

I hope users start to use coordinates, make these plots much nicer.

@canyon289
Copy link
Member Author

canyon289 commented Sep 12, 2018

Will users have a choice? I think if given a pystan or pymc3 object arviz does all the coordinate and dim assignment for them under the hood for most of the plots

@ahartikainen
Copy link
Contributor

Yes, but like giving names and stuff

@canyon289
Copy link
Member Author

canyon289 commented Sep 12, 2018

Sorry I dont follow. When you say giving names what do you mean? In the API the only mechanism I see is users selecting a subset of names and coords with the var_names and coords argument but they are unable to specify them directly.

Do you mean the users should specify the names in pystan or pymc3 before they use arviz?

I feel like Im asking you a bunch of questions recently, I hope you don't mind :) Thanks for the feedback

Edit
To be more specific giving the coordinate names so they look nice in plots?

@ahartikainen
Copy link
Contributor

Yes, people have let's say Beta vector of 10 variables, and they have names for each of them. So instead of using only Beta0, ... they can use names for them, and plotting will consider them automagically. It is easier for users to handle more complex datasets.

@ColCarroll ColCarroll merged commit 6fdacae into arviz-devs:master Sep 12, 2018
@ColCarroll
Copy link
Member

This looks beautiful, way better than before!

I think using the labels will rely on us providing good examples and docs, and on the default dimension names being so ugly (beta_dim_0, etc)!

@canyon289 canyon289 changed the title [WIP] Break axes labels at selection Break axes labels at selection Sep 13, 2018
@canyon289 canyon289 deleted the label_break branch September 20, 2018 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants