-
Notifications
You must be signed in to change notification settings - Fork 100
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
Substrate heatmaps in SVGs, defined in config file #219
Substrate heatmaps in SVGs, defined in config file #219
Conversation
This extends the functionality of plotting substrate heatmaps on SVG output: * Allows for all colormaps permitted in studio for visualizing substrate concentrations * Allows for configuration of this heatmap in the XML configuration file * updates all sample projects so that they can use this functionality just by enabling SVG substrate plots in the XML
Including previous discussions from PR #204 here: Original PR message:Two main changes being suggested here: Make SVG plots with substrates easier: Add the substrate_coloring_function to the template main.cpp and pass it into the three calls to SVG_plot so that all projects starting from there can include the substrate plot in SVGs just by configuring via xml or studio. If it is not set, SVG_plot already cleverly ignores all this, even if not specified. In other words, it should not cause errors. Most of the lines added are simply the specifications for turbo, jet, and plasma. These have higher resolution because it was when I was adding those that I realized I could easily get Matlab to print out what I needed to specify these colormaps to arbitrary precision. Update on studio implementationFollow up: the implementation in studio is already done and passed preliminary testing (just me). Inclusion of other PR changesChanges made in #216 included here as well. |
Also, add the substrate element to the template project's SVG element in the config file. set to enabled="false" so as not to force this
On hold for some testing by Vincent |
0f3c9e5
to
47c60e3
Compare
47c60e3
to
6941b6c
Compare
Beautiful work, and cover dev discussion on slack confirms. Approved! |
This extends the functionality of plotting substrate heatmaps on SVG output:
To utilize this, open a new project with the herein-modified
template
project and skip to Step 3 below. To make use of this in an existing project, do the following:main.cpp
. Immediately after definingcell_coloring_function
works.SVG_plot
inmain.cpp
with the following. There are likely 3 calls to replace.<SVG>
node with the following block to the configuration file, e.g.config/PhysiCell_settings.xml
. Thecolormap
element can be any ofYlOrRd
,viridis
,turbo
,jet
,plasma
,original
, or any of these with_r
appended to reverse the colormap.