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

changing scale on heat map (thermal profile through time) #195

Closed
KRChristianson opened this issue Mar 10, 2016 · 11 comments
Closed

changing scale on heat map (thermal profile through time) #195

KRChristianson opened this issue Mar 10, 2016 · 11 comments

Comments

@KRChristianson
Copy link

I am trying to compare heat maps of different waters, however, the thermal scale of varying colors changes from map to map, making it difficult to make comparisons. Any ideas on how to be able to set a color scale?

@jordansread
Copy link
Member

I like this idea, and I think it should be supported.

I would suggest adding an additional argument to the heatmap functions that lets you pass in a range. Right now I think you can specify a palette, but the range is auto-calculated, which is a bit limiting.

@jordansread
Copy link
Member

working on a pull request for this. But it is just for plot_temp_compare and plot_var_compare for now. Are you using plot_var?

image

Syntax

sim_folder <- run_example_sim(verbose = FALSE)
nc_file <- file.path(sim_folder, 'output.nc')
nml_file <- file.path(sim_folder, 'glm2.nml')
field_file <- file.path(sim_folder, 'field_data.tsv')

plot_temp_compare(nc_file, field_file, fig_path='test.png', col_lim=c(3.5,35))

This will lock the color range to 3.5-35°C

lawinslow pushed a commit that referenced this issue Mar 14, 2016
@KRChristianson
Copy link
Author

Thanks.
I am getting an error that states col_lim is not a graphical parameter

On Mon, Mar 14, 2016 at 9:15 AM, Luke Winslow notifications@github.com
wrote:

Closed #195 #195 via e146658
e146658
.


Reply to this email directly or view it on GitHub
#195 (comment).

Kyle Christianson
PhD Student
NSF I-WATER Fellow
Department of Fish, Wildlife and Conservation Biology
1474 Campus Delivery
Colorado State University
Fort Collins, CO 80523-1474
kchrist@rams.colostate.edu
701-361-6790

@jordansread
Copy link
Member

I think you will need to update the package @KRChristianson

library(devtools)
install_github('USGS-R/glmtools')

does that work for you?

@KRChristianson
Copy link
Author

I received the following error: Error in loadNamespace(j <- i[[1L]],
c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘sp’

On Mon, Mar 14, 2016 at 1:45 PM, Jordan S Read notifications@github.com
wrote:

I think you will need to update the package @KRChristianson
https://github.com/KRChristianson

library(devtools)
install_github('USGS-R/glmtools')

does that work for you?


Reply to this email directly or view it on GitHub
#195 (comment).

Kyle Christianson
PhD Student
NSF I-WATER Fellow
Department of Fish, Wildlife and Conservation Biology
1474 Campus Delivery
Colorado State University
Fort Collins, CO 80523-1474
kchrist@rams.colostate.edu
701-361-6790

@jordansread
Copy link
Member

You had that error with this command?

library(devtools)
install_github('USGS-R/glmtools')

if you don't have devtools, can you install it w/ install.packages('devtools')?

@lawinslow
Copy link
Member

I've gotten that before. It's sometimes useful to restart R and force the sp package install.

install.packages('sp')
library(devtools)
install_github('USGS-R/glmtools')

@jordansread
Copy link
Member

yeah, but glmtools doesn't use sp, right?

@KRChristianson
Copy link
Author

That worked! Many thanks! I am still working on learning the workings of
R...

On Mon, Mar 14, 2016 at 2:23 PM, Jordan S Read notifications@github.com
wrote:

yeah, but glmtools doesn't use sp, right?


Reply to this email directly or view it on GitHub
#195 (comment).

Kyle Christianson
PhD Student
NSF I-WATER Fellow
Department of Fish, Wildlife and Conservation Biology
1474 Campus Delivery
Colorado State University
Fort Collins, CO 80523-1474
kchrist@rams.colostate.edu
701-361-6790

@lawinslow
Copy link
Member

No, but for whatever reason, I've run into that exact thing on various packages.

@jordansread
Copy link
Member

weird. Haven't hit that one. Keep us posted as to how that new col_lim thing works @KRChristianson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants