Big plots shiny

258 views
Skip to first unread message

Carlos Leite

unread,
May 24, 2016, 3:44:45 PM5/24/16
to Shiny - Web Framework for R
Hi,

I have really big plots, like heatmaps, and I would like to know if:

1) Is there a way to "create" something similar like the window in RStudio with the zoom button?
2) If not, how can I change what you see in the image? (so the size of the menu and all the layout follow the size of the plot)

















What I am doing here is calling a reactive UI(in the main panel), where I call plotOutput("plot1") and I set a size in the output$plot1 <- renderPlot. Then I plotOutput("plot2") etc
I don't know if this is the best way to visualize this plots.

Thank's a lot for your help!

Carlos Leite

unread,
May 25, 2016, 10:00:49 AM5/25/16
to Shiny - Web Framework for R
Any help? :) 
Thank's

Joe Cheng

unread,
May 25, 2016, 12:54:40 PM5/25/16
to Carlos Leite, Shiny - Web Framework for R
I don't fully understand what you're asking--if you mean, can the plot and input area all follow the size of the browser window, you might try fillPage/fillRow/fillCol functions.



--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/2e685007-87df-4fbc-ad04-0155791313ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Carlos Leite

unread,
May 25, 2016, 12:59:12 PM5/25/16
to Shiny - Web Framework for R, carlosmaga...@gmail.com
Hey Joe,

Thank's a lot for your answer.
In the image, the plot is bigger than the layout of the page. I would like to know if there is a way to plot the heatmap, for example, in the main_panel, in a small size, and then click on the heatmap and open a window, with a predefined size (to zoom the plot). 

Joe Cheng

unread,
May 25, 2016, 5:54:23 PM5/25/16
to Carlos Leite, Shiny - Web Framework for R
This sort of works:


Ideally the zoomed plot would resize itself as the size of the window changes, but it doesn't.

Carlos Leite

unread,
May 26, 2016, 11:58:52 AM5/26/16
to Shiny - Web Framework for R, carlosmaga...@gmail.com

Hey Joe,

Thank's a lot for your answer. That kind of works, but I have an interface with many plots and I will leave it that way. 
Is there a way for the grey bar, on the top, follow the size of the plots, in a dynamic way? Like this: (I want t have the scroll option, so fillPage is not an option). This is a tabPanel and, under that Panel e have a sidebarLayout. 

















Again, thank you so much for the support that you give to us

Joe Cheng

unread,
May 26, 2016, 12:00:25 PM5/26/16
to Carlos Leite, Shiny - Web Framework for R
I'm not sure why the grey bar is doing that. Do you have a minimal reproducible example you could send me?

Carlos Leite

unread,
May 26, 2016, 12:32:36 PM5/26/16
to Shiny - Web Framework for R, carlosmaga...@gmail.com
I am sorry Joe, I should have done this earlier. 
This is a minimal example:


Thank's a lot for your help

Joe Cheng

unread,
May 26, 2016, 12:46:26 PM5/26/16
to Carlos Leite, Shiny - Web Framework for R
OK, I don't have a solution for that grey bar. Bootstrap just doesn't like it when you put things into the layout that are larger than their columns.

However, we can at least do much better with your dynamic sizing:

(Note the width="auto" height="auto" on plotOutput, this is what you should do if you're setting exact sizes in the renderPlot call.)

Carlos Leite

unread,
May 26, 2016, 2:46:06 PM5/26/16
to Shiny - Web Framework for R, carlosmaga...@gmail.com
Thanks Joe.
So, in your opinion, should I leave the plots in this way? Because I need that the user be able to see the big plots... And I don't see a better way.
Thank's for your suggestion about the reactive size (I've tried that earlier and I've got it).
Reply all
Reply to author
Forward
0 new messages