-
Notifications
You must be signed in to change notification settings - Fork 6
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
Maybe show the legend in a floating HTML element/outside the plot in Shiny? Also for basic plotting? #156
Comments
See also issue #101 |
Might also be useful for normal plotting |
This turns out to be pretty much and might require some serious changes to the code. However, as a workaround, there's now a parameter |
commit 5c1d4f9 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 24 17:39:41 2022 +0200 As submitted to CRAN commit fdeb7d8 Author: Dan Dediu <ddediu@gmail.com> Date: Sat Jun 18 20:33:35 2022 +0200 Fix CRAN check errors and warnings commit a6d8423 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 17 16:43:49 2022 +0200 Solve GitHub #190 by allowing the recovery of the mapping between events and episodes/sliding windows, and even plotting it commit 5a74ae9 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 17 12:42:44 2022 +0200 Implement return.mapping.events.sliding.window for CMA_sliding_window commit 7768564 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 17 11:33:07 2022 +0200 Fix GitHub #192: now align.first.event.at.zero is FALSE by default commit f0f3b5d Author: Dan Dediu <ddediu@gmail.com> Date: Thu Jun 16 23:39:57 2022 +0200 The simple CMAs return .EVENT.USED.IN.CMA in event.info commit 9b5975a Author: Dan Dediu <ddediu@gmail.com> Date: Wed Jun 15 16:28:13 2022 +0200 Fix GitHub #191 and bump version to 0.8 commit 3cac87b Author: Dan Dediu <ddediu@gmail.com> Date: Mon Jun 6 16:46:45 2022 +0200 Fix GitHub #184: Python 3 wrapper does not show anymore warnings about overriding some arguments commit 85475b1 Author: Dan Dediu <ddediu@gmail.com> Date: Mon Jun 6 16:15:44 2022 +0200 Python3 wrapper: handle plotting complex CMAs with event intervals commit 2880088 Author: Dan Dediu <ddediu@gmail.com> Date: Mon Jun 6 16:14:31 2022 +0200 Fix bug when plotting complex CMAs showing event intervals with custom column names commit 37c25c7 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 18:13:47 2022 +0200 Update the NEWS.md to reflect the Python 3 changes commit 58d2b7d Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 18:11:18 2022 +0200 Rebuild the Python3 vignette (and remove the junyper checkpoint) commit 6c4a539 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 18:07:55 2022 +0200 AdhereR works from Python 3 Jupyter Notebooks (and with rpy2)! I also update the vignette and added two notebook examples commit bc77b21 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 15:06:44 2022 +0200 Fix GitHub #184 and a bug with Python3 and plotting complex CMAs commit 675d57a Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 14:05:24 2022 +0200 Pyhton3 wrapper: handle medication groups (defined by a column in the data) commit 17d6b22 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 11:29:49 2022 +0200 Python 3 wrapper: finished updating plot() + small bug fixes commit 8d5d13e Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 30 16:51:35 2022 +0200 Python3 wrapper: add plot.partial.CMAs* to plot() commit bac9449 Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 30 13:43:37 2022 +0200 Python3 wrapper: add CMA.cex to plot() commit 9ed89d2 Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 30 11:51:04 2022 +0200 Python3 wrapper: add dose* to plot() commit e641baa Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 30 10:52:01 2022 +0200 Python3 wrapper: implemented medication.groups in plot() commit a135ce3 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 27 19:31:06 2022 +0200 Python3 wrapper: xlab, ylab & title added to plot() commit 69e6575 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 27 12:54:08 2022 +0200 Python3 wrapper: make col.cats in plot() work commit be1a454 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 27 11:32:19 2022 +0200 Fix bug: cex.title in plot() was not implemented commit e1b5b65 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 27 11:08:08 2022 +0200 Starting to update the Python3 wrapper to reflect the new parameters commit c2ddb1a Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 25 17:05:02 2022 +0200 Fix GitHub #182: the vignette shows how to change an AdhereR plot commit b19e6bd Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 23 22:10:25 2022 +0200 Fixes issue #181 (plotting with aligned patients) and shows how to use AdhereR with pipe commit 05d02b4 Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 19:21:46 2022 +0200 Latest source packages AdhereR 0.7.1 and bump to AdhereRViz 0.2.1 commit 79a966f Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 19:19:16 2022 +0200 Work-around for GitHub #156 by allowing the plotting of the legend only commit 9e5a311 Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 12:35:57 2022 +0200 Fix #169 by forcing arguments.that.should.not.be.defined=NULL (smartly) in sliding windows and per episodes commit 42a3a82 Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 11:59:10 2022 +0200 Shiny: make sure the event interval defaults are correctly reset on changing the CMA commit cf985f3 Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 11:51:36 2022 +0200 Fix #179 (CMA class not correctly initialised/updated in Shiny) commit 9348b76 Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 18 19:19:00 2022 +0200 Shiny UI allows plotting event intervals for sliding windows and per per episodes Controlled from Aesthetics -> Event intervals; default = FALSE commit 6e28af7 Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 18 16:22:25 2022 +0200 AdhererViz: bump version and fix check warnings commit e4f5d36 Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 18 13:09:18 2022 +0200 Fixes GitHub issue #172 commit af2443c Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 18 13:05:10 2022 +0200 Per episodes can also show the event intervals and gaps commit ae58093 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 17 14:44:20 2022 +0200 Update documentation and fix check warnings commit 24eb65e Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 17 14:27:27 2022 +0200 Plotting events and gaps seems to work for sliding windows commit a51e0b1 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 13 13:25:32 2022 +0200 Plotting intervals and gaps for sliding windows seems to work (but needs testing) commit 95facec Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 13 11:14:48 2022 +0200 ... actually, it does make sense to compute the inner.event.info even for overlapping windows (it is the user's problem to use them or not) commit 9426ed5 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 13 11:06:24 2022 +0200 Don't compute the inner.event.info if the sliding windows are overlapping commit f3ac228 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 13 10:22:04 2022 +0200 Don't print inner.event.info if present for per_episode and sliding_window objects commit f0c6a68 Author: Dan Dediu <ddediu@gmail.com> Date: Tue Apr 5 19:57:25 2022 +0200 Now plot() respects the order of patients given through patients.to.plot commit f8cfb67 Author: Dan Dediu <ddediu@gmail.com> Date: Wed Nov 24 17:31:12 2021 +0100 GitHub #172 : initial plotting of inner event intervals commit 049760a Author: Dan Dediu <ddediu@gmail.com> Date: Wed Nov 24 16:56:02 2021 +0100 Fix GitHub #175 + some other preliminary work on plotting event intervals in sliding windows and per intervals (but nothing user-visible yet) commit ac22abe Author: Dan Dediu <ddediu@gmail.com> Date: Mon Nov 22 12:44:14 2021 +0100 Fix GitHub #174 (plus a small bug fix when plotting as a time series with 1 point) Now the placeholder for partial CMAs is plotted even if they don't have one... commit 6c9846e Author: Dan Dediu <ddediu@gmail.com> Date: Sun Nov 7 23:56:53 2021 +0100 GitHub #172 Proof-of-concept that I can return the full event.info from sliding windows -> it adds overheads so disabled by default, but can be enabled by forcing the new argument return.inner.event.info to TRUE
commit c2735f5 Author: Dan Dediu <ddediu@gmail.com> Date: Tue Jul 5 17:37:50 2022 +0200 Bugfix 0.8.1 commit c3964db Author: Dan Dediu <ddediu@gmail.com> Date: Mon Jun 27 13:28:30 2022 +0200 Fix CMA_polypharmacy() crash in 0.8.0 commit a856c89 Author: Dan Dediu <ddediu@gmail.com> Date: Sat Jun 25 11:55:09 2022 +0200 Julia: check that RCall, R and AdhereR/AdhereRViz are installed and work commit 47a5f2b Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 24 20:58:33 2022 +0200 Bump version to 0.8.1 commit 9b33030 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 24 20:56:41 2022 +0200 Starting to work on the Julia bridge commit 5c1d4f9 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 24 17:39:41 2022 +0200 As submitted to CRAN commit fdeb7d8 Author: Dan Dediu <ddediu@gmail.com> Date: Sat Jun 18 20:33:35 2022 +0200 Fix CRAN check errors and warnings commit a6d8423 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 17 16:43:49 2022 +0200 Solve GitHub #190 by allowing the recovery of the mapping between events and episodes/sliding windows, and even plotting it commit 5a74ae9 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 17 12:42:44 2022 +0200 Implement return.mapping.events.sliding.window for CMA_sliding_window commit 7768564 Author: Dan Dediu <ddediu@gmail.com> Date: Fri Jun 17 11:33:07 2022 +0200 Fix GitHub #192: now align.first.event.at.zero is FALSE by default commit f0f3b5d Author: Dan Dediu <ddediu@gmail.com> Date: Thu Jun 16 23:39:57 2022 +0200 The simple CMAs return .EVENT.USED.IN.CMA in event.info commit 9b5975a Author: Dan Dediu <ddediu@gmail.com> Date: Wed Jun 15 16:28:13 2022 +0200 Fix GitHub #191 and bump version to 0.8 commit 3cac87b Author: Dan Dediu <ddediu@gmail.com> Date: Mon Jun 6 16:46:45 2022 +0200 Fix GitHub #184: Python 3 wrapper does not show anymore warnings about overriding some arguments commit 85475b1 Author: Dan Dediu <ddediu@gmail.com> Date: Mon Jun 6 16:15:44 2022 +0200 Python3 wrapper: handle plotting complex CMAs with event intervals commit 2880088 Author: Dan Dediu <ddediu@gmail.com> Date: Mon Jun 6 16:14:31 2022 +0200 Fix bug when plotting complex CMAs showing event intervals with custom column names commit 37c25c7 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 18:13:47 2022 +0200 Update the NEWS.md to reflect the Python 3 changes commit 58d2b7d Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 18:11:18 2022 +0200 Rebuild the Python3 vignette (and remove the junyper checkpoint) commit 6c4a539 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 18:07:55 2022 +0200 AdhereR works from Python 3 Jupyter Notebooks (and with rpy2)! I also update the vignette and added two notebook examples commit bc77b21 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 15:06:44 2022 +0200 Fix GitHub #184 and a bug with Python3 and plotting complex CMAs commit 675d57a Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 14:05:24 2022 +0200 Pyhton3 wrapper: handle medication groups (defined by a column in the data) commit 17d6b22 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 31 11:29:49 2022 +0200 Python 3 wrapper: finished updating plot() + small bug fixes commit 8d5d13e Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 30 16:51:35 2022 +0200 Python3 wrapper: add plot.partial.CMAs* to plot() commit bac9449 Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 30 13:43:37 2022 +0200 Python3 wrapper: add CMA.cex to plot() commit 9ed89d2 Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 30 11:51:04 2022 +0200 Python3 wrapper: add dose* to plot() commit e641baa Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 30 10:52:01 2022 +0200 Python3 wrapper: implemented medication.groups in plot() commit a135ce3 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 27 19:31:06 2022 +0200 Python3 wrapper: xlab, ylab & title added to plot() commit 69e6575 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 27 12:54:08 2022 +0200 Python3 wrapper: make col.cats in plot() work commit be1a454 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 27 11:32:19 2022 +0200 Fix bug: cex.title in plot() was not implemented commit e1b5b65 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 27 11:08:08 2022 +0200 Starting to update the Python3 wrapper to reflect the new parameters commit c2ddb1a Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 25 17:05:02 2022 +0200 Fix GitHub #182: the vignette shows how to change an AdhereR plot commit b19e6bd Author: Dan Dediu <ddediu@gmail.com> Date: Mon May 23 22:10:25 2022 +0200 Fixes issue #181 (plotting with aligned patients) and shows how to use AdhereR with pipe commit 05d02b4 Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 19:21:46 2022 +0200 Latest source packages AdhereR 0.7.1 and bump to AdhereRViz 0.2.1 commit 79a966f Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 19:19:16 2022 +0200 Work-around for GitHub #156 by allowing the plotting of the legend only commit 9e5a311 Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 12:35:57 2022 +0200 Fix #169 by forcing arguments.that.should.not.be.defined=NULL (smartly) in sliding windows and per episodes commit 42a3a82 Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 11:59:10 2022 +0200 Shiny: make sure the event interval defaults are correctly reset on changing the CMA commit cf985f3 Author: Dan Dediu <ddediu@gmail.com> Date: Thu May 19 11:51:36 2022 +0200 Fix #179 (CMA class not correctly initialised/updated in Shiny) commit 9348b76 Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 18 19:19:00 2022 +0200 Shiny UI allows plotting event intervals for sliding windows and per per episodes Controlled from Aesthetics -> Event intervals; default = FALSE commit 6e28af7 Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 18 16:22:25 2022 +0200 AdhererViz: bump version and fix check warnings commit e4f5d36 Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 18 13:09:18 2022 +0200 Fixes GitHub issue #172 commit af2443c Author: Dan Dediu <ddediu@gmail.com> Date: Wed May 18 13:05:10 2022 +0200 Per episodes can also show the event intervals and gaps commit ae58093 Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 17 14:44:20 2022 +0200 Update documentation and fix check warnings commit 24eb65e Author: Dan Dediu <ddediu@gmail.com> Date: Tue May 17 14:27:27 2022 +0200 Plotting events and gaps seems to work for sliding windows commit a51e0b1 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 13 13:25:32 2022 +0200 Plotting intervals and gaps for sliding windows seems to work (but needs testing) commit 95facec Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 13 11:14:48 2022 +0200 ... actually, it does make sense to compute the inner.event.info even for overlapping windows (it is the user's problem to use them or not) commit 9426ed5 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 13 11:06:24 2022 +0200 Don't compute the inner.event.info if the sliding windows are overlapping commit f3ac228 Author: Dan Dediu <ddediu@gmail.com> Date: Fri May 13 10:22:04 2022 +0200 Don't print inner.event.info if present for per_episode and sliding_window objects commit f0c6a68 Author: Dan Dediu <ddediu@gmail.com> Date: Tue Apr 5 19:57:25 2022 +0200 Now plot() respects the order of patients given through patients.to.plot commit f8cfb67 Author: Dan Dediu <ddediu@gmail.com> Date: Wed Nov 24 17:31:12 2021 +0100 GitHub #172 : initial plotting of inner event intervals commit 049760a Author: Dan Dediu <ddediu@gmail.com> Date: Wed Nov 24 16:56:02 2021 +0100 Fix GitHub #175 + some other preliminary work on plotting event intervals in sliding windows and per intervals (but nothing user-visible yet) commit ac22abe Author: Dan Dediu <ddediu@gmail.com> Date: Mon Nov 22 12:44:14 2021 +0100 Fix GitHub #174 (plus a small bug fix when plotting as a time series with 1 point) Now the placeholder for partial CMAs is plotted even if they don't have one... commit 6c9846e Author: Dan Dediu <ddediu@gmail.com> Date: Sun Nov 7 23:56:53 2021 +0100 GitHub #172 Proof-of-concept that I can return the full event.info from sliding windows -> it adds overheads so disabled by default, but can be enabled by forcing the new argument return.inner.event.info to TRUE
Hello @ddediu, Please find below R code to plot cma0 plot and legends separate. I think this may be helpful for other researchers. Thanks in advance... load the required librarieslibrary(AdhereR) Load the built-in dataset "med.events":df <- med.events %>% filter(PATIENT_ID %in% c(37,76)) Take a look into datahead(med.events) Create a CMA0 object to generate patient historycma0 <- CMA0(data=df, # use the two selected patients plot the treatment patterns1. Create a 1 x 2 plotting matrixpar(mfrow = c(1,2)) 2. create only cma0 plotplot(cma0, # the object to plot 3. add legends onlyplot(cma0, # the object to plot Output: |
This would avoid crowding of the shiny plot and be better from an UI perspective
The text was updated successfully, but these errors were encountered: