FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
solventmapcreator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yusuf Hamied Department of Chemistry
Hunter Group
SSIPtools
SSIMPLEapps
solventmapcreator
Commits
6deb1107
Commit
6deb1107
authored
7 years ago
by
M.D. Driver
Browse files
Options
Downloads
Patches
Plain Diff
created script for plotting similarity maps.
parent
7bc5c3af
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
solventmapcreator/polynomialanalysis/polynomialsimilaritymatrixplotting.py
+43
-0
43 additions, 0 deletions
.../polynomialanalysis/polynomialsimilaritymatrixplotting.py
with
43 additions
and
0 deletions
solventmapcreator/polynomialanalysis/polynomialsimilaritymatrixplotting.py
0 → 100644
+
43
−
0
View file @
6deb1107
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script for plotting the similarity Matrix information as a graph, for
graphical comparison.
@author: mark
"""
import
logging
import
numpy
as
np
import
matplotlib.pyplot
as
plt
import
resultsanalysis.resultsoutput.plottinginput
as
plottinginput
logging
.
basicConfig
()
LOGGER
=
logging
.
getLogger
(
__name__
)
LOGGER
.
setLevel
(
logging
.
WARN
)
def
create_similarity_matrix
(
input_data
,
filename_stem
,
**
kwargs
):
"""
This creates the similarity plot for the given data and outputs to file.
"""
simil_plot
,
simil_plot_axis
=
create_similarity_matrix
(
input_data
,
**
kwargs
)
fileformat
=
kwargs
.
get
(
"
fileformat
"
,
"
eps
"
)
output_filename
=
filename_stem
+
fileformat
plt
.
savefig
(
output_filename
,
format
=
fileformat
)
plt
.
close
(
simil_plot
)
def
plot_similarity_matrix
(
input_data
,
**
kwargs
):
"""
This creates the similarity plot for the given input data.
"""
simil_plot
,
simil_plot_axis
=
create_plot_with_axis
(
kwargs
.
get
(
"
figsize
"
,
plottinginput
.
FIGURE_SIZES
[
'
similarity_matrix
'
]))
mat_ax
=
simil_plot_axis
.
matshow
(
input_data
[
"
value_matrix
"
],
interpolation
=
"
nearest
"
)
simil_plot_axis
.
grid
(
True
)
simil_plot_axis
.
xticks
(
range
(
len
(
input_data
[
"
labels
"
])),
input_data
[
"
labels
"
])
simil_plot_axis
.
yticks
(
range
(
len
(
input_data
[
"
labels
"
])),
input_data
[
"
labels
"
])
simil_plot
.
colorbar
(
mat_ax
)
return
simil_plot
,
simil_plot_axis
def
create_plot_with_axis
(
figsize
):
"""
This creates the plot and axis.
"""
return
plottinginput
.
create_plot_with_axis
(
figsize
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment