Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plot Serializer
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RDM Tools
Plot Serializer
Commits
c2d49f6f
Commit
c2d49f6f
authored
Aug 4, 2024
by
Julius
Browse files
Options
Downloads
Patches
Plain Diff
fixed syntax error
parent
6c8ca8ee
No related branches found
No related tags found
1 merge request
!19
completed four issues, added heavy support for adding metadata, revised part...
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
plot_serializer/matplotlib/serializer.py
+16
-22
16 additions, 22 deletions
plot_serializer/matplotlib/serializer.py
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
with
17 additions
and
23 deletions
plot_serializer/matplotlib/serializer.py
+
16
−
22
View file @
c2d49f6f
...
...
@@ -8,27 +8,20 @@ from typing import (
Union
,
)
from
matplotlib.figure
import
Figure
as
MplFigure
from
matplotlib.axes
import
Axes
as
MplAxes
from
mpl_toolkits.mplot3d.axes3d
import
Axes3D
as
MplAxes3D
from
mpl_toolkits.mplot3d.art3d
import
Path3DCollection
from
mpl_toolkits.mplot3d.art3d
import
Poly3DCollection
import
matplotlib.cm
as
cm
import
matplotlib.colors
as
mcolors
import
matplotlib.pyplot
from
matplotlib.lines
import
Line2D
from
matplotlib.
container
import
BarContainer
,
ErrorbarContainer
import
numpy
as
np
from
matplotlib.
axes
import
Axes
as
MplAxes
from
matplotlib.collections
import
PathCollection
from
matplotlib.container
import
BarContainer
,
ErrorbarContainer
from
matplotlib.figure
import
Figure
as
MplFigure
from
matplotlib.lines
import
Line2D
from
matplotlib.patches
import
Polygon
import
matplotlib.colors
as
mcolors
import
matplotlib.cm
as
cm
import
numpy
as
np
from
mpl_toolkits.mplot3d.art3d
import
Path3DCollection
,
Poly3DCollection
from
mpl_toolkits.mplot3d.axes3d
import
Axes3D
as
MplAxes3D
from
numpy
import
ndarray
from
plot_serializer.serializer
import
Serializer
from
plot_serializer.proxy
import
Proxy
from
plot_serializer.model
import
(
Axis
,
Bar2D
,
...
...
@@ -41,6 +34,7 @@ from plot_serializer.model import (
HistDataset
,
HistogramTrace
,
LineTrace2D
,
LineTrace3D
,
PiePlot
,
Plot
,
Plot2D
,
...
...
@@ -51,10 +45,10 @@ from plot_serializer.model import (
ScatterTrace2D
,
ScatterTrace3D
,
Slice
,
LineTrace3D
,
SurfaceTrace3D
,
)
from
plot_serializer.proxy
import
Proxy
from
plot_serializer.serializer
import
Serializer
__all__
=
[
"
MatplotlibSerializer
"
]
...
...
@@ -118,7 +112,7 @@ def _convert_matplotlib_scale(scale: str) -> Scale:
def
_convert_matplotlib_color
(
color
:
Union
[
str
|
Tuple
[
float
,
float
,
float
]
|
Tuple
[
float
,
float
,
float
]]
color
:
Union
[
str
|
Tuple
[
float
,
float
,
float
]
|
Tuple
[
float
,
float
,
float
]]
,
)
->
str
:
# TODO: We leave the color as-is for now, but we should probably
# build some kind of conversion later, so plotserializer has a
...
...
@@ -305,7 +299,6 @@ class _AxesProxy(Proxy[MplAxes]):
*
args
:
Any
,
**
kwargs
:
Any
,
)
->
PathCollection
:
path
=
self
.
delegate
.
scatter
(
x_values
,
y_values
,
*
args
,
**
kwargs
)
try
:
...
...
@@ -501,7 +494,9 @@ class _AxesProxy(Proxy[MplAxes]):
)
return
container
def
hist
(
self
,
x
,
*
args
,
**
kwargs
)
->
tuple
[
def
hist
(
self
,
x
,
*
args
,
**
kwargs
)
->
tuple
[
ndarray
|
list
[
ndarray
],
ndarray
,
BarContainer
|
Polygon
|
list
[
BarContainer
|
Polygon
],
...
...
@@ -633,7 +628,6 @@ class _AxesProxy3D(Proxy[MplAxes3D]):
*
args
:
Any
,
**
kwargs
:
Any
,
)
->
Path3DCollection
:
path
=
self
.
delegate
.
scatter
(
x_values
,
y_values
,
z_values
,
*
args
,
**
kwargs
)
try
:
...
...
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
1
View file @
c2d49f6f
...
...
@@ -79,7 +79,7 @@ select = [
"W"
,
"I"
,
"B"
,
"PT"
"PT"
,
"N"
,
"D"
,
]
...
...
...
...
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
sign in
to comment