Re: [Matplotlib-users] Quiver 3D ValueError

2014-10-10 Thread Thomas Caswell
You need 1.4.0 as the 3D quiver code is not in 1.3.1.

On Fri, Oct 10, 2014 at 5:02 PM, Thomas Proctor
 wrote:
> I'm trying to generate a 3D quiver plot.  When I try running the sample
> available at
> http://matplotlib.org/mpl_examples/mplot3d/quiver3d_demo.py
> I get a "ValueError: too many values to unpack" error.  I'm using matplotlib
> 1.3.1 (the version available on the Ubuntu repositories).
>
> Does anyone know what's up with this?  I'm assuming that this sample will
> work if I had the right version, can anyone tell me what version I would
> need?
>
> Thanks!
>
>
>
> --
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://p.sf.net/sfu/Zoho
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>



-- 
Thomas Caswell
tcasw...@gmail.com

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Quiver 3D ValueError

2014-10-10 Thread Benjamin Root
chances are, something is wonky with the inputs that is causing the
broadcasting not to work correctly. Could you post a simple, self-contained
code example?

Ben Root

On Fri, Oct 10, 2014 at 5:02 PM, Thomas Proctor 
wrote:

> I'm trying to generate a 3D quiver plot.  When I try running the sample
> available at 
> http://matplotlib.org/mpl_examples/mplot3d/quiver3d_demo.py
> I get a "ValueError: too many values to unpack" error.  I'm using
> matplotlib 1.3.1 (the version available on the Ubuntu repositories).
>
> Does anyone know what's up with this?  I'm assuming that this sample will
> work if I had the right version, can anyone tell me what version I would
> need?
>
> Thanks!
>
>>
>
>
> --
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://p.sf.net/sfu/Zoho
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Quiver 3D ValueError

2014-10-10 Thread Thomas Proctor
I'm trying to generate a 3D quiver plot.  When I try running the sample
available at 
http://matplotlib.org/mpl_examples/mplot3d/quiver3d_demo.py
I get a "ValueError: too many values to unpack" error.  I'm using
matplotlib 1.3.1 (the version available on the Ubuntu repositories).

Does anyone know what's up with this?  I'm assuming that this sample will
work if I had the right version, can anyone tell me what version I would
need?

Thanks!

>
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] twinx cla problem

2014-10-10 Thread Duke, Charles
Yes, I did. Same result as with cla().
Thanks,
Charlie

-Original Message-
From: Sterling Smith [mailto:smit...@fusion.gat.com] 
Sent: Friday, October 10, 2014 11:30 AM
To: Duke, Charles
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] twinx cla problem

This is not tested, but did you try ax2.clear() instead?

-Sterling

On Oct 10, 2014, at 7:45AM, Duke, Charles wrote:

> With matplotlib 1.4.0 the cla() method for the twinx axes also clears the 
> primary axes.  With matplotlib 1.3.1 the method only clears the twinx axes as 
> expected.  I have a much longer program where the twinx axes must be cleared 
> while retaining the primary axis plot.  I would prefer not to replot the 
> entire graph each time the twinx axes change.  You can see this by adding the 
> cla method to the matplotlib web site example, two_scales.py, shown below.
>  
> I have matplotlib installed via the anaconda package. Matplotlib 1.4.0 is 
> from anaconda 2.1.0.  Matplotlib 1.3.1 is from 1.9 versions of the anaconda 
> package.
>  
> Linux version:
> Linux gamow 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 
> GNU/Linux Same cla() result on osX 10.9.4.
>  
> Same result for backends Qt4Agg and TkAgg;  the cla() method cleared both 
> axes.
> I also tried various other options such as setting ax2.hold(False) prior to 
> replotting  ax2.  However, once again ax1 was cleared.  The ax2 clear 
> commands seem to apply to the ax1 axis as well???  These options worked as 
> expected  for the earlier matplotlib version, clearing only the ax2 axis.
>  
> Here's the code:  if you execute the code, you should see a blank figure with 
> the cla() included and the usual two graphs without the cla() method.
>  
> 
> import numpy as np
> import matplotlib.pyplot as plt
>  
> fig, ax1 = plt.subplots()
> t = np.arange(0.01, 10.0, 0.01)
> s1 = np.exp(t)
> ax1.plot(t, s1, 'b-')
> ax1.set_xlabel('time (s)')
> # Make the y-axis label and tick labels match the line color.
> ax1.set_ylabel('exp', color='b')
> for tl in ax1.get_yticklabels():
> tl.set_color('b')
>  
> ax2 = ax1.twinx()
> s2 = np.sin(2*np.pi*t)
> ax2.plot(t, s2, 'r.')
> ax2.set_ylabel('sin', color='r')
> for tl in ax2.get_yticklabels():
> tl.set_color('r')
>  
> # single line addition to the two_scales.py example # clears both ax2 
> and ax1 under matplotlib 1.4.0, clears only ax2 under matplotlib 1.3.1 
> # obviously, same result with ax2.clear() method
> ax2.cla()
>  
> plt.show()
>  
>  
> I would appreciate any help;  this looks like a bug in the latest version of 
> matplotlib.
> I could not find any reference to this problem in earlier posts.
>  
> Thanks,
> Charlie
>  
> --
>  Meet PCI DSS 3.0 Compliance Requirements with EventLog 
> Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI 
> DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download 
> White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with 
> EventLog Analyzer 
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.
> clktrk___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] twinx cla problem

2014-10-10 Thread Eric Firing
On 2014/10/10, 4:45 AM, Duke, Charles wrote:
> With matplotlib 1.4.0 the cla() method for the twinx axes also clears
> the primary axes.  With matplotlib 1.3.1 the method only clears the
> twinx axes as expected.  I have a much longer program where the twinx
> axes must be cleared while retaining the primary axis plot.  I would
> prefer not to replot the entire graph each time the twinx axes change.
>   You can see this by adding the cla method to the matplotlib web site
> example, two_scales.py, shown below.
>
> I have matplotlib installed via the anaconda package. Matplotlib 1.4.0
> is from anaconda 2.1.0.  Matplotlib 1.3.1 is from 1.9 versions of the
> anaconda package.
>
> Linux version:
>
> Linux gamow 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux
>
> Same cla() result on osX 10.9.4.
>
> Same result for backends Qt4Agg and TkAgg;  the cla() method cleared
> both axes.
>
> I also tried various other options such as setting ax2.hold(False) prior
> to replotting  ax2.  However, once again ax1 was cleared.  The ax2 clear
> commands seem to apply to the ax1 axis as well???  These options worked
> as expected  for the earlier matplotlib version, clearing only the ax2 axis.
>
> Here’s the code:  if you execute the code, you should see a blank figure
> with the cla() included and the usual two graphs without the cla() method.
>
> 
>
> import numpy as np
>
> import matplotlib.pyplot as plt
>
> fig, ax1 = plt.subplots()
>
> t = np.arange(0.01, 10.0, 0.01)
>
> s1 = np.exp(t)
>
> ax1.plot(t, s1, 'b-')
>
> ax1.set_xlabel('time (s)')
>
> # Make the y-axis label and tick labels match the line color.
>
> ax1.set_ylabel('exp', color='b')
>
> for tl in ax1.get_yticklabels():
>
>  tl.set_color('b')
>
> ax2 = ax1.twinx()
>
> s2 = np.sin(2*np.pi*t)
>
> ax2.plot(t, s2, 'r.')
>
> ax2.set_ylabel('sin', color='r')
>
> for tl in ax2.get_yticklabels():
>
>  tl.set_color('r')
>
> # single line addition to the two_scales.py example
>
> # clears both ax2 and ax1 under matplotlib 1.4.0, clears only ax2 under
> matplotlib 1.3.1
>
> # obviously, same result with ax2.clear() method
>
> ax2.cla()
>
> plt.show()
>
> I would appreciate any help;  this looks like a bug in the latest
> version of matplotlib.


Charlie,

I agree--it does look like a regression in 1.4.  Would you post it as a 
github issue, please?

Thank you.

Eric

>
> I could not find any reference to this problem in earlier posts.
>
> Thanks,
>
> Charlie
>
>
>
> --
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
>
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>


--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot twice

2014-10-10 Thread Thomas Caswell
Something is going really sideways on your system as `Gcf` is the
class that the static method is a member of.  If you have the method
to call it, then you have the class defined.

My guess is there is some race condition is the cleanup-at-exit code
where the system is cleaning up the class object before this function
is getting run.

I suspect a better fix is to change all of the staticmethods -> classmethods

Tom

On Fri, Oct 10, 2014 at 1:38 PM, Mark Janikas  wrote:
> Thanks for pointer on the None…. Just got the future warning in my code when
> comparing a numpy array param in a class of mine that defaults to None.
> That should be solved differently… but I have plenty of other params that
> default to None and I will change them accordingly….
>
>
>
> Back to the traceback… it occurs on matplotlib 1.3 AND 1.4
>
>
>
> TY,
>
>
>
> MJ
>
>
>
> From: ben.v.r...@gmail.com [mailto:ben.v.r...@gmail.com] On Behalf Of
> Benjamin Root
> Sent: Wednesday, October 8, 2014 6:20 PM
> To: Mark Janikas
> Cc: Matplotlib Users
> Subject: Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot
> twice
>
>
>
> Which version of matplotlib and which backend?
>
> Also, don't use == or != when comparing to None. Use "is" and "is not".
>
> Ben Root
>
>
> --
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://p.sf.net/sfu/Zoho
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>



-- 
Thomas Caswell
tcasw...@gmail.com

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot twice

2014-10-10 Thread Mark Janikas
Thanks for pointer on the None…. Just got the future warning in my code when 
comparing a numpy array param in a class of mine that defaults to None.  That 
should be solved differently… but I have plenty of other params that default to 
None and I will change them accordingly….

Back to the traceback… it occurs on matplotlib 1.3 AND 1.4

TY,

MJ

From: ben.v.r...@gmail.com [mailto:ben.v.r...@gmail.com] On Behalf Of Benjamin 
Root
Sent: Wednesday, October 8, 2014 6:20 PM
To: Mark Janikas
Cc: Matplotlib Users
Subject: Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot 
twice


Which version of matplotlib and which backend?

Also, don't use == or != when comparing to None. Use "is" and "is not".

Ben Root
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] twinx cla problem

2014-10-10 Thread Sterling Smith
This is not tested, but did you try ax2.clear() instead?

-Sterling

On Oct 10, 2014, at 7:45AM, Duke, Charles wrote:

> With matplotlib 1.4.0 the cla() method for the twinx axes also clears the 
> primary axes.  With matplotlib 1.3.1 the method only clears the twinx axes as 
> expected.  I have a much longer program where the twinx axes must be cleared 
> while retaining the primary axis plot.  I would prefer not to replot the 
> entire graph each time the twinx axes change.  You can see this by adding the 
> cla method to the matplotlib web site example, two_scales.py, shown below.
>  
> I have matplotlib installed via the anaconda package. Matplotlib 1.4.0 is 
> from anaconda 2.1.0.  Matplotlib 1.3.1 is from 1.9 versions of the anaconda 
> package.
>  
> Linux version:
> Linux gamow 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux
> Same cla() result on osX 10.9.4.
>  
> Same result for backends Qt4Agg and TkAgg;  the cla() method cleared both 
> axes.
> I also tried various other options such as setting ax2.hold(False) prior to 
> replotting  ax2.  However, once again ax1 was cleared.  The ax2 clear 
> commands seem to apply to the ax1 axis as well???  These options worked as 
> expected  for the earlier matplotlib version, clearing only the ax2 axis.
>  
> Here’s the code:  if you execute the code, you should see a blank figure with 
> the cla() included and the usual two graphs without the cla() method.
>  
> 
> import numpy as np
> import matplotlib.pyplot as plt
>  
> fig, ax1 = plt.subplots()
> t = np.arange(0.01, 10.0, 0.01)
> s1 = np.exp(t)
> ax1.plot(t, s1, 'b-')
> ax1.set_xlabel('time (s)')
> # Make the y-axis label and tick labels match the line color.
> ax1.set_ylabel('exp', color='b')
> for tl in ax1.get_yticklabels():
> tl.set_color('b')
>  
> ax2 = ax1.twinx()
> s2 = np.sin(2*np.pi*t)
> ax2.plot(t, s2, 'r.')
> ax2.set_ylabel('sin', color='r')
> for tl in ax2.get_yticklabels():
> tl.set_color('r')
>  
> # single line addition to the two_scales.py example
> # clears both ax2 and ax1 under matplotlib 1.4.0, clears only ax2 under 
> matplotlib 1.3.1
> # obviously, same result with ax2.clear() method
> ax2.cla()
>  
> plt.show()
>  
>  
> I would appreciate any help;  this looks like a bug in the latest version of 
> matplotlib.
> I could not find any reference to this problem in earlier posts.
>  
> Thanks,
> Charlie
>  
> --
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] twinx cla problem

2014-10-10 Thread Duke, Charles
With matplotlib 1.4.0 the cla() method for the twinx axes also clears the 
primary axes.  With matplotlib 1.3.1 the method only clears the twinx axes as 
expected.  I have a much longer program where the twinx axes must be cleared 
while retaining the primary axis plot.  I would prefer not to replot the entire 
graph each time the twinx axes change.  You can see this by adding the cla 
method to the matplotlib web site example, two_scales.py, shown below.

I have matplotlib installed via the anaconda package. Matplotlib 1.4.0 is from 
anaconda 2.1.0.  Matplotlib 1.3.1 is from 1.9 versions of the anaconda package.

Linux version:
Linux gamow 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux
Same cla() result on osX 10.9.4.

Same result for backends Qt4Agg and TkAgg;  the cla() method cleared both axes.
I also tried various other options such as setting ax2.hold(False) prior to 
replotting  ax2.  However, once again ax1 was cleared.  The ax2 clear commands 
seem to apply to the ax1 axis as well???  These options worked as expected  for 
the earlier matplotlib version, clearing only the ax2 axis.

Here's the code:  if you execute the code, you should see a blank figure with 
the cla() included and the usual two graphs without the cla() method.


import numpy as np
import matplotlib.pyplot as plt

fig, ax1 = plt.subplots()
t = np.arange(0.01, 10.0, 0.01)
s1 = np.exp(t)
ax1.plot(t, s1, 'b-')
ax1.set_xlabel('time (s)')
# Make the y-axis label and tick labels match the line color.
ax1.set_ylabel('exp', color='b')
for tl in ax1.get_yticklabels():
tl.set_color('b')

ax2 = ax1.twinx()
s2 = np.sin(2*np.pi*t)
ax2.plot(t, s2, 'r.')
ax2.set_ylabel('sin', color='r')
for tl in ax2.get_yticklabels():
tl.set_color('r')

# single line addition to the two_scales.py example
# clears both ax2 and ax1 under matplotlib 1.4.0, clears only ax2 under 
matplotlib 1.3.1
# obviously, same result with ax2.clear() method
ax2.cla()

plt.show()


I would appreciate any help;  this looks like a bug in the latest version of 
matplotlib.
I could not find any reference to this problem in earlier posts.

Thanks,
Charlie

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users