Add Contour and Filled Contour Plotting Capabilities#216
Add Contour and Filled Contour Plotting Capabilities#216CoryMartin-NOAA merged 10 commits intodevelopfrom
Conversation
EdwardSafford-NOAA
left a comment
There was a problem hiding this comment.
Generally this looks good. I had some questions which are mostly cut and paste issues I think.
CoryMartin-NOAA
left a comment
There was a problem hiding this comment.
haven't tested but additions look good, can you add some example plots to the PR so we know it works?
|
Looks good, will merge once we have another +1 review |
Dooruk
left a comment
There was a problem hiding this comment.
Thanks @kevindougherty-noaa, looks good. We are in the process of switching to spack 1.9, I will test creating a vertical transect with the SOCA output once we are done with that.
|
I tried this but wasn't able to run it, perhaps my configuration is wrong?: graphics:
plotting_backend: Emcpy
figure_list:
# Map plots
# --------
- batch figure:
variables: [ave_ssh]
figure:
figure size: [20,10]
layout: [1,1]
title: 'SOCA'
output name: soca_ave_ssh.png
plots:
- mapping:
projection: plcarr
domain: global
add_map_features: ['coastline']
add_colorbar:
label: ave_ssh
add_grid:
layers:
- type: FilledContourPlot
x:
variable: sst_only::SOCAgrid::lon
y:
variable: sst_only::SOCAgrid::lat
z:
variable: sst_only::SOCAVars::ave_ssh
First I get the following error: src/eva/plotting/batch/emcpy/diagnostics/emcpy_filled_contour_plot.py", line 36, in configure_plot If I change # Create declarative plotting FilledContourPlot object
# ----------------------------------------------------
self.plotobj = emcpy.plots.plots.FilledContourPlot(self.xdata, self.ydata, self.z)to # Create declarative plotting FilledContourPlot object
# ----------------------------------------------------
self.plotobj = emcpy.plots.plots.FilledContourPlot(self.xdata, self.ydata, self.zdata)I get spack-stack/scu17/spack-stack-1.9.0/envs/ue-intel-2021.10.0/install/intel/2021.10.0/py-matplotlib-3.7.4-xf2yck4/lib/python3.11/site-packages/matplotlib/contour.py", line 1475, in _check_xyz I tried turning if the flatten method didn't help either so I declare defeat. Would it be possible to add a test config and input file? Reading part is fine: INFO DataCollections: //////////////////////////////////////////////////////////////////////////////// |
|
@kevindougherty-noaa any chance you have the YAML that made that figure? |
|
@CoryMartin-NOAA I will take a look at this. |
## Description This PR looks to add a missing need for Filled Contour Map plots and Gridded plots. Specifically attempting to solve the following issue: [here](#216 (comment)) ## Dependencies Waiting on the following PRs: - [x] waiting on [NOAA-EMC/emcpy/pull/145](NOAA-EMC/emcpy#145) --------- Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>

Description
This PR adds the ability to plot contour and filled contour plots from EMCPy's plotting capabilities. The appropriate driver scripts and configuration yamls have been created.
Dependencies
None.
Impact
Please list the other repositories (if any) that this PR will require changes in (example below):
None.