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

Fix plotting in owsa_opt_strat() #67

Open
2 of 4 tasks
evaenns opened this issue May 21, 2019 · 1 comment
Open
2 of 4 tasks

Fix plotting in owsa_opt_strat() #67

evaenns opened this issue May 21, 2019 · 1 comment
Assignees

Comments

@evaenns
Copy link
Collaborator

evaenns commented May 21, 2019

Fix plotting inconsistencies / quirks in owsa_opt_strat():

  • The ordering in which parameters are plotted isn't consistent. I think it should follow the same ordering as how the user inputs the strategies into the owsa object, regardless of alphabetical ordering or anything like that. The user likely has a desired ordering / grouping of parameters and we should follow their input! I think the function currently re-orders parameters in alphabetical ordering. Not sure if the ordering is changed in the creation of the owsa() function or just for plotting.

  • The boxes don't line up with axis labels. Also number of x-axis ticks isn't consistent and doesn't strictly follow the input parameter. Why is this happening?

  • Standardize x-axis labeling. I don't know exactly how to fix this, but sometimes the axis labels looked squished, whereas it would be nice if the axis labeling looked consistently clean across all parameters. Might require a bunch of use cases to see what's happening.

  • Changing the text size parameter doesn't change the size of the titles (param1, param2, etc.) at the top of each bar. We definitely want that to increase (perhaps as a separate parameter, since you may want larger titles while keeping the axis text smaller?)

@evaenns evaenns changed the title Fix ordering of plotting in owsa_opt_strat() Fix plotting in owsa_opt_strat() May 21, 2019
gknowlt added a commit that referenced this issue Jul 2, 2019
gknowlt added a commit that referenced this issue Jul 2, 2019
Added parameter list option to owsa_opt_start(). Closes #66

Parameter ordering in plot matches the input by the user in the owsa_opt_strat() function. If no input is provided, all parameters are shown and the order matches the order from the owsa object (rather than being alphabetical)

Added a new parameter in owsa_plot_strat and add_common_aes that allows for the text size of the facet labels to be set manually. Leaving this blank defaults to facet label size of the previous build.

As for the middle two issues from #67 , it seems that the spacing and number of the tick marks on the x-axes are ultimately controlled by the pretty() function. The n_x_ticks parameter provides pretty() with a target number of tick marks, but it seems like pretty() makes some internal decisions about what will look best. I will keep messing around with the parameter values to see if something looks better.

The tick marks don't line up with the rectangles because pretty() is forcing the tick marks to appear at nice, round numbers that frame the region of interest. Should this be changed so that tick marks show the values of the exact borders?
@gknowlt
Copy link
Collaborator

gknowlt commented Jul 21, 2019

I'm still having some trouble getting ggplot's facet_wrap to cooperate--will return to this once the more major bugs are fixed.

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

No branches or pull requests

2 participants