PlotBasics: Difference between revisions

From CASA Guides
Jump to navigationJump to search
(Created page with "=== 3 Ways to plot === There are three ways to go about plotting in matplotlib. 1. You can use the pylab environment 2. You can use the matplotlib.pyplot environment, with pl...")
 
Line 4: Line 4:


1.  You can use the pylab environment
1.  You can use the pylab environment
2.  You can use the matplotlib.pyplot environment, with plotting commands and functions.
2.  You can use the matplotlib.pyplot environment, with plotting commands and functions.
3.  You can define plot objects, and then use the pyplot methods on those objects.
3.  You can define plot objects, and then use the pyplot methods on those objects.


The last way gives you most control, but the other two are somewhat easier.  We will give examples using the last two ways here.
The last way gives you most control, but the other two are somewhat easier.  We will give examples using the last two ways here.


=== Supernova Cosmology Example
=== Supernova Cosmology Example ===

Revision as of 14:29, 31 October 2011

3 Ways to plot

There are three ways to go about plotting in matplotlib.

1. You can use the pylab environment

2. You can use the matplotlib.pyplot environment, with plotting commands and functions.

3. You can define plot objects, and then use the pyplot methods on those objects.

The last way gives you most control, but the other two are somewhat easier. We will give examples using the last two ways here.

Supernova Cosmology Example