dear members, I am a day trader based in INDIA. I use R for my research. I have about 200 vectors whose histograms I need to inspect. I have to compare them simultaneously. I know methods whereby you can plot multiple histograms on one screen. However, you can clearly view only 4 to 5 histograms in one screen. Is there a way to construct a long list of all the 100 histograms that can be scrollable (like you scroll up or down the R console) both downwards and upwards? Any package to that effect? I would be highly grateful, also, if you can offer any suggestions or "out of the box" ideas to simultaneously compare all the 100 histograms. very many thanks for your help and support.. yours sincerely, AKSHAY M KULKARNI [[alternative HTML version deleted]]
Hi what about to create all histograms in pdf device? see ?pdf Cheers Petr> -----Original Message----- > From: R-help <r-help-bounces at r-project.org> On Behalf Of akshay kulkarni > Sent: Tuesday, January 22, 2019 2:21 PM > To: R help Mailing list <r-help at r-project.org> > Subject: [R] large number of scrollable histograms.... > > dear members, > I am a day trader based in INDIA. I use R for my research. > > I have about 200 vectors whose histograms I need to inspect. I have to > compare them simultaneously. > > I know methods whereby you can plot multiple histograms on one screen. > However, you can clearly view only 4 to 5 histograms in one screen. > > Is there a way to construct a long list of all the 100 histograms that can be > scrollable (like you scroll up or down the R console) both downwards and > upwards? Any package to that effect? > > I would be highly grateful, also, if you can offer any suggestions or "out of the > box" ideas to simultaneously compare all the 100 histograms. > > very many thanks for your help and support.. > yours sincerely, > AKSHAY M KULKARNI > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.Osobn? ?daje: Informace o zpracov?n? a ochran? osobn?ch ?daj? obchodn?ch partner? PRECHEZA a.s. jsou zve?ejn?ny na: https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about processing and protection of business partner?s personal data are available on website: https://www.precheza.cz/en/personal-data-protection-principles/ D?v?rnost: Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou d?v?rn? a podl?haj? tomuto pr?vn? z?vazn?mu prohl??en? o vylou?en? odpov?dnosti: https://www.precheza.cz/01-dovetek/ | This email and any documents attached to it may be confidential and are subject to the legally binding disclaimer: https://www.precheza.cz/en/01-disclaimer/
Another alternative is to use ggplot2 to create the various plots, then put them into a list and use cowplot::plot_grid to plot the grid of plots with a specified number of rows and columns. Here's some pseudo code to give you the general idea Step 1: generate the plots and put them into a list for ( i in 1:(nrow*ncol) ) pL[[ i ]] <- ggplot( ... ) Step 2: display the plots in a grid print( cowplot::plot_grid( plotlist=pL, nrow=nrow, ncol=ncol ) ) On Tue, Jan 22, 2019 at 3:49 PM PIKAL Petr <petr.pikal at precheza.cz> wrote:> Hi > > what about to create all histograms in pdf device? > > see > ?pdf > > Cheers > Petr > > > > -----Original Message----- > > From: R-help <r-help-bounces at r-project.org> On Behalf Of akshay kulkarni > > Sent: Tuesday, January 22, 2019 2:21 PM > > To: R help Mailing list <r-help at r-project.org> > > Subject: [R] large number of scrollable histograms.... > > > > dear members, > > I am a day trader based in INDIA. I use R > for my research. > > > > I have about 200 vectors whose histograms I need to inspect. I have to > > compare them simultaneously. > > > > I know methods whereby you can plot multiple histograms on one screen. > > However, you can clearly view only 4 to 5 histograms in one screen. > > > > Is there a way to construct a long list of all the 100 histograms that > can be > > scrollable (like you scroll up or down the R console) both downwards and > > upwards? Any package to that effect? > > > > I would be highly grateful, also, if you can offer any suggestions or > "out of the > > box" ideas to simultaneously compare all the 100 histograms. > > > > very many thanks for your help and support.. > > yours sincerely, > > AKSHAY M KULKARNI > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting- > > guide.html > > and provide commented, minimal, self-contained, reproducible code. > Osobn? ?daje: Informace o zpracov?n? a ochran? osobn?ch ?daj? obchodn?ch > partner? PRECHEZA a.s. jsou zve?ejn?ny na: > https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information > about processing and protection of business partner?s personal data are > available on website: > https://www.precheza.cz/en/personal-data-protection-principles/ > D?v?rnost: Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou > d?v?rn? a podl?haj? tomuto pr?vn? z?vazn?mu prohl??en? o vylou?en? > odpov?dnosti: https://www.precheza.cz/01-dovetek/ | This email and any > documents attached to it may be confidential and are subject to the legally > binding disclaimer: https://www.precheza.cz/en/01-disclaimer/ > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
>>>>> "akshay" == akshay kulkarni <akshay_e4 at hotmail.com> writes:akshay> dear members, akshay> I am a day trader based in INDIA. I use R for my research. akshay> I have about 200 vectors whose histograms I need to akshay> inspect. I have to compare them simultaneously. akshay> I know methods whereby you can plot multiple histograms on akshay> one screen. However, you can clearly view only 4 to 5 akshay> histograms in one screen. akshay> Is there a way to construct a long list of all the 100 akshay> histograms that can be scrollable (like you scroll up or akshay> down the R console) both downwards and upwards? Any package akshay> to that effect? akshay> I would be highly grateful, also, if you can offer any akshay> suggestions or "out of the box" ideas to simultaneously akshay> compare all the 100 histograms. akshay> very many thanks for your help and support.. akshay> yours sincerely, akshay> AKSHAY M KULKARNI Just two thoughts: 1) You could plot all histograms into one pdf and scroll the PDF. 2) Do you need histograms? Boxplots for instance need less space (and if you sort the input data by median, say, they often help much better to see differences between samples); or use similar plots such as quartile plots (e.g. https://cran.r-project.org/web/packages/NMOF/vignettes/qTableEx.pdf ). kind regards Enrico -- Enrico Schumann Lucerne, Switzerland http://enricoschumann.net
You can use knitr (child documents) with rmarkdown to generate an html file containing many htmlwidgets. There are many htmlwidgets you can choose from, see [1]. You can also use htmlwidgets with shiny if you prefer, though I don't know if you can get the many plots simultaneously with shiny. Some htmlwidgets even support linkage between the plots, so if you scroll or zoom through the x-axis on one, the others can adjust similarly. [1] http://gallery.htmlwidgets.org On January 22, 2019 5:20:35 AM PST, akshay kulkarni <akshay_e4 at hotmail.com> wrote:>dear members, > I am a day trader based in INDIA. I use R for my research. > >I have about 200 vectors whose histograms I need to inspect. I have to >compare them simultaneously. > >I know methods whereby you can plot multiple histograms on one screen. >However, you can clearly view only 4 to 5 histograms in one screen. > >Is there a way to construct a long list of all the 100 histograms that >can be scrollable (like you scroll up or down the R console) both >downwards and upwards? Any package to that effect? > >I would be highly grateful, also, if you can offer any suggestions or >"out of the box" ideas to simultaneously compare all the 100 >histograms. > >very many thanks for your help and support.. >yours sincerely, >AKSHAY M KULKARNI > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.-- Sent from my phone. Please excuse my brevity.
dear pikal, Thanks for the suggestion.... I have checked ?pdf. The syntax is:> pdf("sample.pdf", 7, 5) > hist(vector1) > dev.off()So, I surmise that instead of one hist function in the second line, if I include multiple histograms through a loop, it would write ALL histograms to sample.pdf (something like this):> pdf("sample.pdf", 7, 5) > histlist > dev.off()> histlist <- function(){ for( i in 1:length(L)){histlist[[i]] <- hist(L[[i]]}; return(histlist)}Am I right? Would this pdf document(sample.pdf) be scrollable? very many thanks for your time.... yours sincerely, AKSHAY M KULKARNI ________________________________ From: PIKAL Petr <petr.pikal at precheza.cz> Sent: Tuesday, January 22, 2019 7:19 PM To: akshay kulkarni; R help Mailing list Subject: RE: large number of scrollable histograms.... Hi what about to create all histograms in pdf device? see ?pdf Cheers Petr> -----Original Message----- > From: R-help <r-help-bounces at r-project.org> On Behalf Of akshay kulkarni > Sent: Tuesday, January 22, 2019 2:21 PM > To: R help Mailing list <r-help at r-project.org> > Subject: [R] large number of scrollable histograms.... > > dear members, > I am a day trader based in INDIA. I use R for my research. > > I have about 200 vectors whose histograms I need to inspect. I have to > compare them simultaneously. > > I know methods whereby you can plot multiple histograms on one screen. > However, you can clearly view only 4 to 5 histograms in one screen. > > Is there a way to construct a long list of all the 100 histograms that can be > scrollable (like you scroll up or down the R console) both downwards and > upwards? Any package to that effect? > > I would be highly grateful, also, if you can offer any suggestions or "out of the > box" ideas to simultaneously compare all the 100 histograms. > > very many thanks for your help and support.. > yours sincerely, > AKSHAY M KULKARNI > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.Osobn? ?daje: Informace o zpracov?n? a ochran? osobn?ch ?daj? obchodn?ch partner? PRECHEZA a.s. jsou zve?ejn?ny na: https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about processing and protection of business partner?s personal data are available on website: https://www.precheza.cz/en/personal-data-protection-principles/ D?v?rnost: Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou d?v?rn? a podl?haj? tomuto pr?vn? z?vazn?mu prohl?en? o vylou?en? odpov?dnosti: https://www.precheza.cz/01-dovetek/ | This email and any documents attached to it may be confidential and are subject to the legally binding disclaimer: https://www.precheza.cz/en/01-disclaimer/ [[alternative HTML version deleted]]