Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

mep12 on pstest.py #4819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
mep12 on pstest.py
  • Loading branch information
ericmjl committed Jul 29, 2015
commit 67c753ca7f95deb0e14f6680b2d3fd13741eae69
43 changes: 19 additions & 24 deletions 43 examples/pylab_examples/pstest.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
#!/usr/bin/env python
# -*- noplot -*-
import matplotlib
matplotlib.use('PS')
from pylab import *

import matplotlib.pyplot as plt
import numpy as np

def f(t):
s1 = cos(2*pi*t)
e1 = exp(-t)
return multiply(s1, e1)

t1 = arange(0.0, 5.0, .1)
t2 = arange(0.0, 5.0, 0.02)
t3 = arange(0.0, 2.0, 0.01)
s1 = np.cos(2*np.pi*t)
e1 = np.exp(-t)
return np.multiply(s1, e1)

figure(1)
subplot(211)
l = plot(t1, f(t1), 'k^')
setp(l, markerfacecolor='k', markeredgecolor='r')
title('A tale of 2 subplots', fontsize=14, fontname='Courier')
ylabel('Signal 1', fontsize=12)
subplot(212)
l = plot(t1, f(t1), 'k>')
t1 = np.arange(0.0, 5.0, .1)
t2 = np.arange(0.0, 5.0, 0.02)
t3 = np.arange(0.0, 2.0, 0.01)

plt.figure(1)
plt.subplot(211)
l = plt.plot(t1, f(t1), 'k^')
plt.setp(l, markerfacecolor='k', markeredgecolor='r')
plt.title('A tale of 2 subplots', fontsize=14, fontname='Courier')
plt.ylabel('Signal 1', fontsize=12)
plt.subplot(212)
l = plt.plot(t1, f(t1), 'k>')

ylabel('Signal 2', fontsize=12)
xlabel('time (s)', fontsize=12)
plt.ylabel('Signal 2', fontsize=12)
plt.xlabel('time (s)', fontsize=12)

show()
plt.show()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.