Skip to content

Commit

Permalink
Fix a serious error in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyxpp committed Sep 10, 2014
1 parent 0589e61 commit 7db4447
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ mpltex Changelog

Here you can see the full list of changes between each ``pltex`` release.

Version 0.2.3
-------------

* Fix an serious error in the sample code in README.

Version 0.2.2
-------------

* The same as v0.2.1.

Version 0.2.1
-------------

Expand Down
18 changes: 10 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ Quickstart
2. Usage
^^^^^^^^

Just add one of ``mpltex`` decorators before your plot functions.
Examples and sample plots can be found `here <http://ngpy.org/post/mpltex/>`_.

Following is a breif introduction. Just add one of ``mpltex`` decorators before your plot functions.

.. code:: python
Expand All @@ -47,7 +49,7 @@ Just add one of ``mpltex`` decorators before your plot functions.
# Then use your_plot in a normal way.
your_plot()
And it will produce images suitable for publishing in American Chemical Society (ACS).
And it will create a plot ready for publishing in journals published by American Chemical Society (ACS).

``mpltex`` also contains several helper functions to faciliate production of specific type of images.
Following codes will produce a set of line arts with cycled line styles and line markers with the help of ``mpltex.linestyle_generator`` function.
Expand All @@ -59,12 +61,14 @@ Following codes will produce a set of line arts with cycled line styles and line
@mpltex.acs_decorator
def your_plot():
# generate data x and y
# ... # generate data x and y
fig, ax = plt.subplots(111)
# The default line style is iterating over
# color, line, and marker with hollow types.
linestyles = mpltex.linestyle_generator()
for i in range(number_of_lines):
# The default line style is iterating over
# color, line, and marker with hollow types.
linestyles = mpltex.linestyle_generator()
ax.plot(x[i], y[i], label=str(i), **linestyles.next())
ax.locator_params(nbins=5) # limit the number of major ticks
Expand All @@ -78,8 +82,6 @@ Following codes will produce a set of line arts with cycled line styles and line
* ``mpltex.presentation_decorator``: output PDF images for presentation slides (Keynote).
* ``mpltex.web_decorator``: output PNG images for web pages.

Examples and sample plots can be found `here <http://ngpy.org/post/mpltex/>`_.

Contribute
----------

Expand Down
2 changes: 1 addition & 1 deletion mpltex/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
Version info for ``mpltex`` package.
"""

__version__ = "0.2.1"
__version__ = "0.2.3"

2 changes: 1 addition & 1 deletion tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def test_plot_scatter():
y = np.random.normal(size=10).cumsum()
x = np.arange(10)
ax.plot(x, y, label=str(i), **linestyle.next())
ax.locator_params(nbins=5)

ax.locator_params(nbins=5)
ax.set_xlabel('Number of steps')
ax.set_ylabel('Distance')
ax.legend(loc='best', ncol=4)
Expand Down

0 comments on commit 7db4447

Please sign in to comment.