Skip to content

Commit e4fbfda

Browse files
committed
add option to plot channels on the same axis
1 parent a563b38 commit e4fbfda

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

apread/apreader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ def collectDatasets(self, channel_names: list[str]) -> list[Tuple[nptyp.NDArray,
273273

274274
return chans
275275

276-
def plot(self, groupIndices=None):
276+
def plot(self, groupIndices=None, sameAxis = False):
277277
"""Plots the complete file.
278278
"""
279279
for group in self.Groups:
280-
group.plot()
280+
group.plot(sameAxis = sameAxis)
281281

282282
def plotGroup(self, channelIndex):
283283
"""Plot a specific channel

apread/entries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def plotChannels(self, start, end):
460460
"""
461461
self.plot(range(start,end))
462462

463-
def plot(self, channelIndices=None):
463+
def plot(self, channelIndices=None, sameAxis = False):
464464
"""
465465
Plots this group of channels.
466466
@@ -488,7 +488,7 @@ def plot(self, channelIndices=None):
488488

489489
axis = ax1
490490
for i,channel in enumerate(channels):
491-
if i > 0:
491+
if i > 0 and not sameAxis:
492492
axis = ax1.twinx()
493493
axis.spines['right'].set_position(('outward', 60*(i-1)))
494494
axis.set_ylabel(channel.unit)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# This call to setup() does all the work
1414
setup(
1515
name="apread",
16-
version="1.1.2-alpha8",
16+
version="1.1.2-alpha9",
1717
description="Import data from CatmanAP binary files.",
1818
long_description=README,
1919
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)