paulgovan / BayesianNetwork

Bayesian Network Modeling and Analysis
http://paulgovan.github.io/BayesianNetwork/
Apache License 2.0
119 stars 38 forks source link

Adjust height of plots #12

Open wdiestel opened 5 years ago

wdiestel commented 5 years ago

Is it possible to adjust the height of the plot views to the right according to the content: if my variables have more than five possible values (20...30 in my case) it gets unreadable. I think an option to double the height or in some cases have 4 times the original height could solve this issue. Alternatively sizing the font according to the available row height could mitigate the issue a bit, but you can't make the font size too small, so increasing the plot box height is preferable.

paulgovan commented 5 years ago

Is there a specific plot that you're talking about or could you share an example?

wdiestel commented 5 years ago

Well it's company internal data I tried with, but if you extend the SampleDiscreteNetwork having all possible values a, b, c ... z isntead of just a, b, c and then show a plot on the Parameters or Inference pages you get this same effect where all the labels appear in a kind of lump.

wdiestel commented 5 years ago

I found a workaround for the moment adding ", height=2000" to the shiny::renderPlot calls in server.R (line 292 and 344), but I think the plot and the box around should either adapt automatically to the number of rows to be drawn or have some scaling feature in the GUI. I'm new to R and couldn't suggest how to do this - the documentation to this lattice lib which seems to be creating the plots looks obscure to me at the moment.

paulgovan commented 5 years ago

I've been wanting to play around with this:

https://yang-tang.github.io/shinyjqui/

Among other things, it allows you to interactively change the size. You may start there to see if it helps.