Problems with pyplot and cm in Matplotlib ver. 1.4.3

I’m attempting to generate contour and a color map in Matplotlib ver. 1.4.3 on a MacBook Pro under Mac OS X ver. 10.10.2 in Python 2.7.3 with the Anaconda environment. Now the messages from Matplotlib I get are:
users-MacBook-Pro:lecture1 user$ python plot_solution.py
Saved pseudocolor plot as pcolor.png
/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/text.py:52: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if rotation in (‘horizontal’, None):
/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/text.py:54: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
elif rotation == ‘vertical’:
Saved contour plot as contour.png
users-MacBook-Pro:lecture1 user$ The python script is attached to this note. Now I’ve observed that the same python script and input data generated the correct contour and color map under Linux2 using Python 2.7.3 and Matplotlib 1.1.1rc.
The questions I have include:

  1. What are the differences between Matplotlib vers. 1.1.1rc and 1.4.3?
  2. What is going on where?
  3. How can I fix this problem?
    Please advise.
    plot_solution.py
···

View this message in context: Problems with pyplot and cm in Matplotlib ver. 1.4.3

Sent from the matplotlib - users mailing list archive at Nabble.com.

Per request my question is being resubmitted here.

I'm attempting to generate contour and a color map in Matplotlib ver. 1.4.3
on a MacBook Pro under Mac OS X ver. 10.10.2 in Python 2.7.3 with the
Anaconda environment.

A zip file has been attached to this note. Two sub-directories,
mathplotlib_1.4.3 and mathplotlib_1.1.1rc are included.

mathplotlib_1.4.3 contains the python script that generates the contour and
color map plots, jpeg files showing the resultant plots and the input data.

mathplotlib_1.1.1rc contains the screen snaps (jpeg files) showing the
correct contour and color map plots generated by the same python script and
input data under Linux2 using Python 2.7.3 and Matplotlib 1.1.1rc.

The questions I have include:
   1. What are the differences between Matplotlib vers. 1.1.1rc and 1.4.3?
   2. What is going on where?
   3. How can I fix this problem?

Please advise.

mathplotlib_issues.zip
<http://matplotlib.1069221.n5.nabble.com/file/n45004/mathplotlib_issues.zip>

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-with-pyplot-and-cm-in-Matplotlib-ver-1-4-3-tp45002p45004.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Hey Starfighter,

I want to help, but I also don’t like unzipping files from strangers. Can you make a simple script that generates some fake with numoy and the handful of matplotib commands you need to make the figure.

-p

···


Sent from Mailbox

On Sat, Feb 21, 2015 at 7:34 PM, Starfighter <sdupree@…4628…> wrote:

Per request my question is being resubmitted here.

I’m attempting to generate contour and a color map in Matplotlib ver. 1.4.3

on a MacBook Pro under Mac OS X ver. 10.10.2 in Python 2.7.3 with the

Anaconda environment.

A zip file has been attached to this note. Two sub-directories,

mathplotlib_1.4.3 and mathplotlib_1.1.1rc are included.

mathplotlib_1.4.3 contains the python script that generates the contour and

color map plots, jpeg files showing the resultant plots and the input data.

mathplotlib_1.1.1rc contains the screen snaps (jpeg files) showing the

correct contour and color map plots generated by the same python script and

input data under Linux2 using Python 2.7.3 and Matplotlib 1.1.1rc.

The questions I have include:

  1. What are the differences between Matplotlib vers. 1.1.1rc and 1.4.3?

  2. What is going on where?

  3. How can I fix this problem?

Please advise.

mathplotlib_issues.zip

http://matplotlib.1069221.n5.nabble.com/file/n45004/mathplotlib_issues.zip

View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-with-pyplot-and-cm-in-Matplotlib-ver-1-4-3-tp45002p45004.html

Sent from the matplotlib - users mailing list archive at Nabble.com.


Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server

from Actuate! Instantly Supercharge Your Business Reports and Dashboards

with Interactivity, Sharing, Native Excel Exports, App Integration & more

Get technology previously reserved for billion-dollar corporations, FREE

http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

matplotlib-users List Signup and Options

This posting contains:
   1. The python script file used to input the data and produce the contour
and color map plots
   2. The input data
   3. JPG files containing screen snaps of the actual contour and color map
plots

Hope this helps.

solution.txt
<http://matplotlib.1069221.n5.nabble.com/file/n45006/solution.txt>
plot_solution.py
<http://matplotlib.1069221.n5.nabble.com/file/n45006/plot_solution.py>

contour.jpg
<http://matplotlib.1069221.n5.nabble.com/file/n45006/contour.jpg>
pcolor.jpg <http://matplotlib.1069221.n5.nabble.com/file/n45006/pcolor.jpg>

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-with-pyplot-and-cm-in-Matplotlib-ver-1-4-3-tp45002p45006.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Per request my question is being resubmitted here.

I'm attempting to generate contour and a color map in Matplotlib ver. 1.4.3
on a MacBook Pro under Mac OS X ver. 10.10.2 in Python 2.7.3 with the
Anaconda environment.

A zip file has been attached to this note. Two sub-directories,
mathplotlib_1.4.3 and mathplotlib_1.1.1rc are included.

mathplotlib_1.4.3 contains the python script that generates the contour and
color map plots, jpeg files showing the resultant plots and the input data.

mathplotlib_1.1.1rc contains the screen snaps (jpeg files) showing the
correct contour and color map plots generated by the same python script and
input data under Linux2 using Python 2.7.3 and Matplotlib 1.1.1rc.

The questions I have include:
    1. What are the differences between Matplotlib vers. 1.1.1rc and 1.4.3?

Well, you just found one of them. You should be able to find most substantial changes in http://matplotlib.org/users/whats_new.html.

    2. What is going on where?

The plt.axis('scaled') call is freezing the xlim and ylim at values resulting from a call to "nonsingular", which is handling the fact that when you call axis(), nothing has been plotted and there is no information about what you want the limits to be. In addition, 'scaled' is one of the axis options that turns off autoscaling. It has always been intended to be called *after* plotting with autoscaling on, or otherwise setting the xlim and ylim to the desired values. I don't know why it worked for you in 1.1.1rc; I think it was long before this that it had the behavior of turning off autoscaling, but I haven't checked.

    3. How can I fix this problem?

Put the "plt.axis('scaled')" line after your pcolor or plot line.

As a side note, in general pcolormesh will yield the same result as pcolor, but *much* faster, so it is recommended in most cases.

Eric

···

On 2015/02/21 5:32 PM, Starfighter wrote:

Please advise.

mathplotlib_issues.zip
<http://matplotlib.1069221.n5.nabble.com/file/n45004/mathplotlib_issues.zip&gt;

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-with-pyplot-and-cm-in-Matplotlib-ver-1-4-3-tp45002p45004.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Eric,

I took your suggestion and it worked. Thank you.

To all the others who responded so quickly, thank you as well.

P.S. - I'm still wondering what other differences between vers. 1.1.1rc and
1.4.3 I'll run into. I'll worry about those when I run into them.

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problems-with-pyplot-and-cm-in-Matplotlib-ver-1-4-3-tp45002p45009.html
Sent from the matplotlib - users mailing list archive at Nabble.com.