Skip to content

Commit

Permalink
fixed bug in plotting lineouts
Browse files Browse the repository at this point in the history
a lineout is also added to the simpleexample.py
  • Loading branch information
skuschel committed Jan 23, 2015
1 parent 8346379 commit 3b8c3d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/simpleexample.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

# use optargsh to force lower resolution
# plot number density
plotter.plotField(pa.createField(PA.X, PA.Y, optargsh=optargsh)) # plot 6
plotter.plotField(pa.createField(PA.X, PA.Y, optargsh=optargsh), lineoutx=True, lineouty=True) # plot 6
# plot phase space
plotter.plotField(pa.createField(PA.X, PA.P, optargsh=optargsh)) # plot 7

Expand Down
8 changes: 4 additions & 4 deletions postpic/plotting/plotter_matplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ def addField2d((fig, ax), field, log10plot=True, interpolation='none',
if ylim is not None:
ax.set_ylim(ylim)
if lineoutx:
self._addxlineout(ax, field.matrix.T, field.extent,
log10=log10plot)
MatplotlibPlotter._addxlineout(ax, field.matrix.T, field.extent,
log10=log10plot)
if lineouty:
self._addylineout(ax, field.matrix.T, field.extent,
log10=log10plot)
MatplotlibPlotter._addylineout(ax, field.matrix.T, field.extent,
log10=log10plot)
MatplotlibPlotter.addaxislabels(ax, field)
MatplotlibPlotter.annotate_fromfield(ax, field)
return
Expand Down

0 comments on commit 3b8c3d3

Please sign in to comment.