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

add support for log scale axis in chart_Series #303

Open
ethanbsmith opened this issue Mar 29, 2020 · 3 comments
Open

add support for log scale axis in chart_Series #303

ethanbsmith opened this issue Mar 29, 2020 · 3 comments

Comments

@ethanbsmith
Copy link
Contributor

Description

Neither of these approaches produce a log scaled y axis

chart_Series(x, log.scale=TRUE)  # like in chartSeries()
chart_Series(x, log="y")         # like in plot.default()

This problem was also identified at : https://stackoverflow.com/questions/25261388/does-chart-series-work-with-logarithmic-axis

Expected behavior

some parameter that will allow at least the y axis to be log scaled. ideally this would also work TA panels

Session Info

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] rio_0.5.16        rvest_0.3.4       xml2_1.2.2        data.table_1.12.2 curl_4.2          quantmod_0.4-15   TTR_0.23-5        xts_0.11-2        zoo_1.8-6         RODBC_1.3-16      doParallel_1.0.15 iterators_1.0.12 
[13] foreach_1.4.7     plotrix_3.7-6     checkpoint_0.4.7 

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.2       magrittr_1.5     hms_0.5.1        lattice_0.20-38  R6_2.4.0         rlang_0.4.0      httr_1.4.1       tools_3.6.3      grid_3.6.3       readxl_1.3.1     tibble_2.1.3     crayon_1.3.4     zip_2.0.4       
[14] vctrs_0.2.0      codetools_0.2-16 zeallot_0.1.0    haven_2.1.1      openxlsx_4.1.0.1 cellranger_1.1.0 pillar_1.4.2     compiler_3.6.3   backports_1.1.4  forcats_0.4.0    foreign_0.8-75   pkgconfig_2.0.3 
> 
@ethanbsmith

This comment was marked as outdated.

@ethanbsmith
Copy link
Contributor Author

while this could be handled through a pars parameter, the same could have been done for the original chartSeries. i think adding a log.scale parameter to the chart_Series function signature, that gets passed through to plot.xts is the better design.

@ethanbsmith
Copy link
Contributor Author

dependent on joshuaulrich/xts#103

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

1 participant