Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • M MAPIES
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Atmospheric Composition
  • MAPIES
  • Issues
  • #60
Closed
Open
Issue created Mar 04, 2025 by Calum Meikle@cmeikleMaintainer

Move plotting to a separate file and plotting object

Move the plotting functions to a separate file. I think for the time being we can have them a single functions, or in a single MAPIESPlotting object. Then in the future we can think of maybe how to incorporate Guillaume's suggestion of an xarray style plotting functionality.

# In the "plotting" module:
from types import SimpleNamespace


def plot_timeseries(mapies_obj, *args, **kwargs):
    raise NotImplementedError


def plot_monthly_map(mapies_obj, *args, **kwargs):
    raise NotImplementedError
        
# In the main module:
from functools import partial
class MyClass:
    def __init__(self):
        pass
        
    @property
    def plot(self):
        return SimpleNamespace(
            timeseries = partial(plot_timeseries, mapies_obj=self),
            monthly_map = partial(plot_monthly_map, mapies_obj=self)
        )

Then to make a plot of your mapies object you would use my_mapies_object.plot.timeseries(x=..., y=...) (edited)

FYI: @cgile

Assignee
Assign to
Time tracking