[Matplotlib-users] How do you use ticklabel_format?

2010-02-03 Thread Joseph Smidt
Hello,

I'm trying to make a simple plot that doesn't use scientific
notation for the x axis since the axise only goes from 1 to 1600.  I
tried using ticklabel_format like this:



from pylab import *

l, cltt = loadtxt('ABF_20_20.dat',unpack=True)
semilogx(l, cltt)
xlim(1,1600)
ax = gca()
ax.ticklabel_format(style='plain',axis='x')
show()



I get this error This method only works with the ScalarFormatter.
which seems to be the error refered to in the documentation.  However,
I'm not sure how to fix the problem?  Is there way to use this
ScalarFormatter some how?  Did I code it wrong?

   If anyone knows how to get the xaxis to not display scientific
notation this would be helpful.  Thanks.

Joseph Smidt


-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How do you use ticklabel_format?

2010-02-03 Thread Joseph Smidt
Sebastian,

Thanks, your hint worked.

On Wed, Feb 3, 2010 at 1:54 PM, Sebastian Busch webmas...@thamnos.de wrote:
 Joseph Smidt wrote:
 Hello,

     I'm trying to make a simple plot that doesn't use scientific
 notation for the x axis ...
 Is there way to use this
 ScalarFormatter some how?  ...

 does this help?

 from pylab import *
 a = arange(1600)
 plot(a,a)
 xscale('log')
 from matplotlib.ticker import ScalarFormatter
 ax = gca().xaxis
 ax.set_major_formatter(ScalarFormatter())


 best,
 sebastian.


 --
 The Planet: dedicated and managed hosting, cloud storage, colocation
 Stay online with enterprise data centers and the best network in the business
 Choose flexible plans and management services without long-term contracts
 Personal 24x7 support from experience hosting pros just a phone call away.
 http://p.sf.net/sfu/theplanet-com
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users





-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Artifacts In Transparent Contour Plots?

2009-07-29 Thread Joseph Smidt
I am making contourf  plots with some transparency as I want to
eventually overlay such plots. When I plot such plots I see artifacts
or lines that shouldn't be there as seen here:
http://josephsmidt.googlepages.com/ex.png

Is this a bug or am I plotting incorrectly?  My script is here:
http://josephsmidt.googlepages.com/plotex.py and the data needed for
the plot is here: http://josephsmidt.googlepages.com/exCHI.txt

However, the relevant part of the code for plotting I'll just cut and
paste here:

levels = [x0, x1, x2, x3]
contourf(Y,X,transpose(CHI),levels,alpha=0.7)
show()

  Thanks.

   Joseph Smidt


-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Artifacts In Transparent Contour Plots?

2009-07-29 Thread Joseph Smidt
Thanks a lot.  The code you mentioned:

cs = contourf(Y,X,transpose(CHI),levels,alpha=0.7)
for c in cs.collections:
   c.set_edgecolors('none')

worked great and the extra lines are gone.

 Joseph Smidt

PS.  Good luck with this issue.  I'd help but I'm not that good.

-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Possible To Contour Around 1-Sigma Curves?

2009-07-28 Thread Joseph Smidt
I have a function on a 2d grid that looks like a skewed mound.  I
would like to make a contour plot where each contour represents each
sigma, or confidence interval.

I.e. Is there a straight forward way to make such a contour plot where
it is then easy to say:  This line is 1-sigma or 68% confidence
interval, this line is 95% confidence interval, etc...

Such plots look like this:
http://lambda.gsfc.nasa.gov/product/map/current/pub_papers/threeyear/parameters/images/Med/ds_f07_PPT_M.png
 where the first region of each graph is the on sigma or 68%
confidence interval and the second line is the 95% confidence
interval.

Thanks.

Joseph Smidt

-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Remove box around legend?

2009-07-09 Thread Joseph Smidt
I see lots of examples on how to play around with the legend, adding
columns, shadow, etc...Is there a way to remove the box so that
all you see are the items of things being plotted with no box around
them?

   Also, keeping the box but removing the black outline around the box
is good enough since it would look like there is no box.

Joseph Smidt

-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Remove box around legend?

2009-07-09 Thread Joseph Smidt
Thank you!  That did it.  I thought I read the webpage you sent 10
times, but didn't even notice.  Thanks.

On Thu, Jul 9, 2009 at 3:38 PM, Chaitanya Krishnaicym...@gmail.com wrote:
 Hi,

 legend.draw_frame(False) should do the trick. Check out
 http://matplotlib.sourceforge.net/api/artist_api.html?highlight=draw_frame#matplotlib.legend.Legend.draw_frame

 Cheers,
 Chaitanya

 On Thu, Jul 9, 2009 at 11:18 PM, Joseph Smidtjosephsm...@gmail.com wrote:
 I see lots of examples on how to play around with the legend, adding
 columns, shadow, etc...    Is there a way to remove the box so that
 all you see are the items of things being plotted with no box around
 them?

   Also, keeping the box but removing the black outline around the box
 is good enough since it would look like there is no box.

                                                Joseph Smidt

 --
 
 Joseph Smidt josephsm...@gmail.com

 Physics and Astronomy
 4129 Frederick Reines Hall
 Irvine, CA 92697-4575
 Office: 949-824-3269

 --
 Enter the BlackBerry Developer Challenge
 This is your chance to win up to $100,000 in prizes! For a limited time,
 vendors submitting new applications to BlackBerry App World(TM) will have
 the opportunity to enter the BlackBerry Developer Challenge. See full prize
 details at: http://p.sf.net/sfu/Challenge
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users





-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Add units to plots?

2009-07-07 Thread Joseph Smidt
I have several plots where the scientific notation exponential
overflows to the top of the plot like this:
http://matplotlib.sourceforge.net/examples/pylab_examples/plotfile_demo.html.

Is there any way to add units to this?  So that, if I wanted, the
units would show up in the overflow as: 1e8 m^3 , for meters cubed?

Also, is there an easy way to add units to the numbers on the x or y
axis in general?  Thanks.

 Joseph Smidt

-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Another Gnuplot style question

2009-04-29 Thread Joseph Smidt
Okay, I am another gnuplot user trying to migrate over to matplotlib.
I like what I see, but there are a couple things that are very easy to
do in Gnuplot that I can't figure out how to do with matplotlib.

I have a file with 3 columns of data called data.txt that looks like:

0.  1. 1.0
0.0634  1.0655  1.1353
0.1269  1.1353  1.28899916094
0.1903  1.2097  1.46345358199
0.2538  1.2889 1.6615188369
0.3173  1.3734 1.88639043926
...

I can plot this data, 2 versus 1 and 3 versus 1, very easily on the
same plot, with a legend, with log y values, and only for the xrange
between 2 and 3 with gnuplot:

set log y
set xrange[2:3]
plot 'data.txt' u 1:2 w l t 'apples', 'data.txt' u 1:3 w l t 'oranges'

Now, how do I do that same thing with matplotlob?  Ie:

1. Both graphs overlayed on the same plot.
2. Semilogy. (log y values),
3. Only ploy for x in the range 2-3.
4. Legend for the two graphs on same plot.

I have spent time looking through the documentation but I can't find
anyway to do this is any straightforward way.  plotfile() looks
promising, but I can't seem to make it do the above.  Thanks in
advance.

 Joseph Smidt

-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Another Gnuplot style question

2009-04-29 Thread Joseph Smidt
Thanks everyone, this is exactly what I wanted.


-- 

Joseph Smidt josephsm...@gmail.com

Physics and Astronomy
4129 Frederick Reines Hall
Irvine, CA 92697-4575
Office: 949-824-3269

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users