Skip to content

Commit

Permalink
Independent x/y log bases.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexras committed Dec 5, 2009
1 parent febee31 commit 844a98b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def __init__(self):
self.logy = False
self.loglog = False
self.logbase = 10
self.logbasex = None
self.logbasey = None

self.grid = False

self.figLegend = False
Expand Down Expand Up @@ -379,9 +382,23 @@ def drawPlot(self, ax):
ax.grid()

if self.loglog or self.logx:
ax.set_xscale('log', basex=self.logbase)
myBase = None

if self.logbasex is not None:
myBase = self.logbasex
else:
myBase = self.logbase

ax.set_xscale('log', basex=myBase)
if self.loglog or self.logy:
ax.set_yscale('log', basey=self.logbase)
myBase = None

if self.logbasey is not None:
myBase = self.logbasey
else:
myBase = self.logbase

ax.set_yscale('log', basey=myBase)

if self.twinxIndex > 0:
ax2 = ax.twinx()
Expand Down

0 comments on commit 844a98b

Please sign in to comment.