[Matplotlib-users] two issues with labels on maps

2010-01-25 Thread Dr. Phillip M. Feldman
The attached program generates a map and then saves it to a file. I have two problems with the result: (1) Note that the screenshot shows a title above the map, while the .png file that was saved by the program does not. (2) I would like to be able to label the lines of latitude and longitude,

Re: [Matplotlib-users] strange error when attempting to generate a map using 'geos' projection

2010-01-24 Thread Dr. Phillip M. Feldman
Jeff Whitaker wrote: snip Philip: That's an error from the proj4 c library saying that it didn't like one of the parameters you used to define the projection. Since you didn't include the parameters you used, I can't say which one is the culprit. -Jeff I've boiled the code down

[Matplotlib-users] strange error when attempting to generate a map using 'geos' projection

2010-01-23 Thread Dr. Phillip M. Feldman
I’ve been experimenting with basemap, and have been able to make maps using the orthographic and polyconic projections. When I try to generate a map using the geostationary projection, I get the error message shown below. I haven’t been able to make head or tail of this message; any advice will

[Matplotlib-users] query about pyplot.text example

2010-01-02 Thread Dr. Phillip M. Feldman
The online documentation at URL= http://www.scipy.org/Cookbook/Matplotlib/Maps has an example that uses plt.text as follows: plt.text(xpt+5,ypt+5,name) Why is the offset 5? -- View this message in context:

[Matplotlib-users] savefig does not save text

2009-12-27 Thread Dr. Phillip M. Feldman
When I try to save a figure to a file using `savefig`, text in the figure (x-axis label, y-axis label, etc.) is not saved. Have other people encountered this problem? I'm using the Enthought Python Distribution 5.1.1 on a 32-bit Windows XP machine. -- View this message in context:

Re: [Matplotlib-users] bug in run_all.py

2009-11-23 Thread Dr. Phillip M. Feldman
Dr. Phillip M. Feldman wrote: The script run_all.py in the basemap examples does not work when Python has been installed to C:\Program Files\Python25. It appears that this problem involves the space in the path. Phillip: I don't have a windows machine to test on - so could you

Re: [Matplotlib-users] `fig.subplots_adjust` does not behave as advertized

2009-11-23 Thread Dr. Phillip M. Feldman
Dr. Phillip M. Feldman wrote: The basemap demo `cubed_sphere.py` contains the following line of code: fig.subplots_adjust(bottom=0, left=0, right=1, top=0, wspace=0, hspace=0) From the documentation, it would appear that `wspace=0` should remove all horizontal space between

Re: [Matplotlib-users] `fig.subplots_adjust` does not behave as advertized

2009-11-23 Thread Dr. Phillip M. Feldman
Dr. Phillip M. Feldman wrote: The basemap demo `cubed_sphere.py` contains the following line of code: fig.subplots_adjust(bottom=0, left=0, right=1, top=0, wspace=0, hspace=0) From the documentation, it would appear that `wspace=0` should remove all horizontal space between

[Matplotlib-users] bug in run_all.py

2009-11-22 Thread Dr. Phillip M. Feldman
The script run_all.py in the basemap examples does not work when Python has been installed to C:\Program Files\Python25. It appears that this problem involves the space in the path. -- View this message in context: http://old.nabble.com/bug-in-run_all.py-tp26470905p26470905.html Sent from the

[Matplotlib-users] separate sub-forum for basemap?

2009-11-22 Thread Dr. Phillip M. Feldman
It seems as though there are enough basemap-related posts that it might be worth creating a separate basemap-specific sub-forum of the matplotlib forum. -- View this message in context: http://old.nabble.com/separate-sub-forum-for-basemap--tp26470932p26470932.html Sent from the matplotlib -

[Matplotlib-users] `fig.subplots_adjust` does not behave as advertized

2009-11-22 Thread Dr. Phillip M. Feldman
The basemap demo `cubed_sphere.py` contains the following line of code: fig.subplots_adjust(bottom=0, left=0, right=1, top=0, wspace=0, hspace=0) From the documentation, it would appear that `wspace=0` should remove all horizontal space between the subplots. But, this isn't what happens.

Re: [Matplotlib-users] Possible to get four y axes on a single plot?

2009-10-27 Thread Dr. Phillip M. Feldman
I've noticed that make_patch_spines_invisible does not use the input argument `ax`. Shouldn't the body of the function def be using `ax` instead of `par2`? Thanks! Phillip snip

Re: [Matplotlib-users] Possible to get four y axes on a single plot?

2009-10-27 Thread Dr. Phillip M. Feldman
/matplotlib/trunk/matplotlib/examples/pylab_examples/multiple_yaxis_with_spines.py?revision=7908view=markup Regards, -JJ On Sat, Oct 24, 2009 at 2:40 PM, Gökhan Sever gokhanse...@gmail.com wrote: On Sat, Oct 24, 2009 at 1:02 PM, Dr. Phillip M. Feldman pfeld...@verizon.net wrote: I'd like

Re: [Matplotlib-users] Possible to get four y axes on a single plot?

2009-10-27 Thread Dr. Phillip M. Feldman
-modifiable code is in Section 2. For most # purposes, it should not be necessary to modify anything else. # Dr. Phillip M. Feldman, 27 Oct, 2009 # Acknowledgment: This program is based on code written by Jae-Joon Lee, # URL= http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib

[Matplotlib-users] spines are tricky!

2009-10-27 Thread Dr. Phillip M. Feldman
Starting with code written by Jae-Joon Lee, I constructed a template program for creating plots with multiple y-axes. The program mostly works, but there are two odd glitches: (1) Not only is the y-axis for dependent variable #1 blue (as it should be), but the entire frame around the plot is

[Matplotlib-users] Possible to get four y axes on a single plot?

2009-10-24 Thread Dr. Phillip M. Feldman
I'd like to create a plot showing motor current, efficiency, speed, and output power versus input power, with all four curves on a single plot and four y axes. I've looked at the example in http://matplotlib.sourceforge.net/examples/api/two_scales.html, and also at the doc string for twinx. It

[Matplotlib-users] how to decrease right margin and move colorbar?

2009-10-09 Thread Dr. Phillip M. Feldman
I am creating a scatter plot using pyplot.scatter(), and adding a colorbar via pyplot.colorbar(). The result is very nice, except that there is a large amount of empty space between the right-hand edge of the axes and the figure window. When I adjust the right-hand margin using something like

[Matplotlib-users] possible bug in LinearSegmentedColormap

2009-10-04 Thread Dr. Phillip M. Feldman
The attached script creates a colormap containing five colors. At the end of the script, I print the value of cmap.N, and it is 256 rather than 5. http://www.nabble.com/file/p25740788/bugdemo.py bugdemo.py -- View this message in context:

[Matplotlib-users] problem with design of matplotlib.pyplot.scatter?

2009-09-30 Thread Dr. Phillip M. Feldman
I'd like to generate a scatter plot in which symbols are colored using a specified colormap, with a specified mapping from the range of the data to the [0,1] colormap interval. I thought at first that one could use the norm argument to specify a function that would perform this mapping, but from

[Matplotlib-users] new interface functions for LinearSegmentedColormap

2009-09-28 Thread Dr. Phillip M. Feldman
After experimenting with colormaps for a while, I was able to make both discrete (piecewise-constant) and continuous (piecewise-linear) colormaps work. Although colormaps can be created directly using LinearSegmentedColormap from the matplotlib.colors package, this is a tedious and error-prone

[Matplotlib-users] can't use custom color maps

2009-09-26 Thread Dr. Phillip M. Feldman
I'd like to be able to create and use a custom colormap. I'm creating the colormap via the following statement: matplotlib.colors.ListedColormap([(0,0,0),(0.6,0,0),(0,0.6,0),(0.6,0.6,0)], name='Earth') The above statement appears to work, but when I attempt to use this colormap, I get the

[Matplotlib-users] sample colormap code is broken

2009-09-26 Thread Dr. Phillip M. Feldman
When I try to run the sample custom colormap code provided at http://matplotlib.sourceforge.net/examples/pylab_examples/custom_cmap.html , I get the following error message: AttributeErrorTraceback (most recent call last) colormaps.py in module() 114 115 blue_red2 =

Re: [Matplotlib-users] Custom colormaps

2009-09-26 Thread Dr. Phillip M. Feldman
When I try to access that Wiki, I get the following message: This page does not exist yet. snip Check this wiki item and the associated mailing list thread: http://www.scipy.org/wikis/topical_software/LoadingAColormapDynamically -- View this message in context:

[Matplotlib-users] where does register_cmap come from?

2009-09-26 Thread Dr. Phillip M. Feldman
When I try to import register_cmap from matplotlib, matplotlib.colors, or any of the other likely candidate modules in which it might be contained, I get a cannot import error. It would be great if the documentation indicated how to import this and provided at least one working example. -- View

[Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Dr. Phillip M. Feldman
The following trivial program is supposed to generate one plot per key press until the user presses 'q'. Instead, nothing is displayed until the user presses 'q'. Any suggestions will be appreciated. from os import sys from matplotlib import * from numpy.random import rand while True: z=

Re: [Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Dr. Phillip M. Feldman
Having to hit Enter is not a major problem, but I'm still not getting anything displayed. I noticed that you used pyplot.draw() instead of pyplot.show(). I've checked the available documentation, but haven't been able to understand the difference between these. I should have mentioned that I'm

[Matplotlib-users] how do colormaps work?

2009-08-23 Thread Dr. Phillip M. Feldman
I've been trying to understand how colormaps work. I've been through the Matplotlib User's Guide (Release 0.98.6svn, dated June 14, 2009), but the section on colormaps has not yet been written. If anyone can point me to documentation or provide an explanation, I'd be grateful. -- View this

[Matplotlib-users] invisible plot

2009-07-15 Thread Dr. Phillip M. Feldman
I'm a newbie to matplotlib. When I try to generate a simple plot, nothing happens. Any advice will be appreciated. Here's my code: from numpy import * from matplotlib import * x= arange(0,10.,0.1) y= x**1.5 - 0.25*x**2 pyplot.figure(figsize=(9, 6), dpi=120) pyplot.plot(x, y) -- View this

[Matplotlib-users] setting axis limits

2009-07-15 Thread Dr. Phillip M. Feldman
One can set axis limits via a command like the following: pyplot.axis([0 10 0 1]) But, there are situations where I'd like to set limits only for the y-axis, leaving the x-axis alone, or vice versa, or set a lower limit for the y-axis but leave the upper limit alone. Is there a clean way of