Skip to content

Commit

Permalink
Add missing file
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Wright <steven.wright@york.ac.uk>
  • Loading branch information
swright87 committed Dec 19, 2023
1 parent a636cf1 commit 40c1fc8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p3/plot/backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
__all__ = [
"Plot",
"CascadePlot",
"CascadePGFPlot" "NavChart",
"CascadePGFPlot",
"NavChart",
]


Expand Down
28 changes: 28 additions & 0 deletions p3/plot/backend/pgfplots.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2022-2023 Intel Corporation
# SPDX-License-Identifier: MIT
"""
Contains objects for interacting with plots produced using the
:py:mod:`pgfplots` backend.
"""

from . import CascadePGFPlot


class CascadePGFPlot(CascadePGFPlot):
"""
Cascade plot object for :py:mod:`pgfplots`.
"""

def __init__(self, stream):
super().__init__("pgfplots")
self.stream = stream

def save(self, filename):
"""
Save the plot to the specified file.
Parameters
----------
filename: string
"""
self.stream.dump(filename)

0 comments on commit 40c1fc8

Please sign in to comment.