[Matplotlib-users] Setting x scale manually, but letting y scale automatic within the current x-axis

2012-02-03 Thread Pål Gunnar Ellingsen
Hi

I've got a plot, containing a graph.
I would like to look at certain parts of it.
To do this I zoom in on the x-axis using set_xlim()
Then I would like to call autoscale(axis='y') and have matplotlib
autoscale the y axis within the current x-axis.

I've tried several ways of doing this, both with autoscale and
set_ylim(auto=True)
but non of them have been able to do this, as they only autoscale y on the
full graph.
In the end I ended up writing my own code for calculating the new ymin and
ymax ans using set_ylim([ymin, ymax]),
but I feel that this should not be necessary.

While googling for the a solution I found an earlier e-mail on the
matplotlib list,
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg19664.html
which describes the same problem, but was never answered.

Is there any other solution for this that I've missed?

Regards

Pål
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] specgram memory problem

2012-02-03 Thread David Craig
Hi, I am using matplotlib to produce some spectrograms for seismic data. I
am looking at a 10 day period with a sample rate of 20sps. I would like to
have my spectrogram to be composed of 10 minute windows with an overlap of
90%. However when I try and run my script I run out of memory. I can
produce the spectrogram for a maximum of 3 days before an error occurs.
I have also tried to produce a spectrogram for each day and stick them
together using subplot, but I then get the error given below. Anyone know a
way around this??
Thanks,
David

Traceback (most recent call last):
  File
/usr/lib/python2.7/site-packages/matplotlib/backends/backend_gtk.py, line
394, in expose_event
self._render_figure(self._pixmap, w, h)
  File
/usr/lib/python2.7/site-packages/matplotlib/backends/backend_gtkagg.py,
line 75, in _render_figure
FigureCanvasAgg.draw(self)
  File
/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py, line
394, in draw
self.figure.draw(self.renderer)
  File /usr/lib/python2.7/site-packages/matplotlib/artist.py, line 55, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File /usr/lib/python2.7/site-packages/matplotlib/figure.py, line 798,
in draw
func(*args)
  File /usr/lib/python2.7/site-packages/matplotlib/artist.py, line 55, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File /usr/lib/python2.7/site-packages/matplotlib/axes.py, line 1946, in
draw
a.draw(renderer)
  File /usr/lib/python2.7/site-packages/matplotlib/artist.py, line 55, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
  File /usr/lib/python2.7/site-packages/matplotlib/image.py, line 354, in
draw
im = self.make_image(renderer.get_image_magnification())
  File /usr/lib/python2.7/site-packages/matplotlib/image.py, line 569, in
make_image
transformed_viewLim)
  File /usr/lib/python2.7/site-packages/matplotlib/image.py, line 201, in
_get_unsampled_image
x = self.to_rgba(self._A, self._alpha)
  File /usr/lib/python2.7/site-packages/matplotlib/cm.py, line 194, in
to_rgba
x = self.cmap(x, alpha=alpha, bytes=bytes)
  File /usr/lib/python2.7/site-packages/matplotlib/colors.py, line 551,
in __call__
rgba = np.empty(shape=xa.shape+(4,), dtype=lut.dtype)
MemoryError
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Setting x scale manually, but letting y scale automatic within the current x-axis

2012-02-03 Thread Benjamin Root
On Friday, February 3, 2012, Pål Gunnar Ellingsen paa...@gmail.com wrote:
 Hi

 I've got a plot, containing a graph.
 I would like to look at certain parts of it.
 To do this I zoom in on the x-axis using set_xlim()
 Then I would like to call autoscale(axis='y') and have matplotlib
 autoscale the y axis within the current x-axis.

 I've tried several ways of doing this, both with autoscale and
set_ylim(auto=True)
 but non of them have been able to do this, as they only autoscale y on
the full graph.
 In the end I ended up writing my own code for calculating the new ymin
and ymax ans using set_ylim([ymin, ymax]),
 but I feel that this should not be necessary.

 While googling for the a solution I found an earlier e-mail on the
matplotlib list,

http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg19664.html
 which describes the same problem, but was never answered.

 Is there any other solution for this that I've missed?

 Regards

 Pål


Actually, the autoscaling is working as it should in your case.  By
default, automatic limits will encompass all data plotted.

The missing piece of your puzzle is specifying an aspect constraint.
 ax.set_aspect() will allow for some sort of relationship between the x and
y axes to exist.  For example, setting it to 'equal' means that limits are
chosen such that a distance on the x axis is displayed the same way as the
same distance in the y-axis.  There are some other preset values and I
think you can specify a float as well.

This is what I can remember of the top of my head. I hope this helps!

Ben Root
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Setting x scale manually, but letting y scale automatic within the current x-axis

2012-02-03 Thread Pål Gunnar Ellingsen
Hi

Thank you for trying to help me, though I can't see how aspect is going
to help me. As I understand of the documentation, it would require me to
know the
relationship between x and y, which I don't.
I can calculate it, but since it varies between each change in xlimits
and different plot, it would be the same as calculating the ylimits.

As for pyplot.xlim(xmin,xmax) (suggested by Ethan Swint), it does the same
as ax.set_xlim() for me.

Below is a sample code that will illustrate the problem.

Regards

Pål

### Start code 

#!/usr/bin/env python
import matplotlib
matplotlib.use('Qt4Agg')   # generate postscript output by default

import matplotlib.pyplot as plt
import numpy as np

# Creating a function to plot
x = np.linspace(-10, 10, 200)
p = np.poly1d([2, 3, 1, 4])
y = p(x) * np.sin(x)

# plotting the full figure
fig = plt.figure()

ax = fig.add_subplot(111)
ax.plot(x, y)
ax.autoscale(tight=True)
plt.title('Full graph. (Press key for next plot)')
plt.draw()

plt.waitforbuttonpress()

# This is how I'm currently doing it
# x limits
xmin = 2
xmax = 6

# Calculating y limits
ymin = y[np.logical_and(xmin  x, x  xmax)].min()
ymax = y[np.logical_and(xmin  x, x  xmax)].max()

# Inserting some room
room = np.maximum(np.abs(ymin * 0.05), np.abs(ymax * 0.05))
ymin = ymin + room * np.sign(ymin)
ymax = ymax + room * np.sign(ymax)

# Setting the limits
ax.set_xlim([xmin, xmax])
ax.set_ylim([ymin, ymax])

plt.title('What I want (Press key for next plot)')
plt.draw()
plt.waitforbuttonpress()

# This is what pyplot does by default if I only set the limits
ax.autoscale(tight=True)
ax.set_xlim([2, 6])

plt.title('What I get if I only use set_xlim (Press key for exit)')
plt.draw()
plt.waitforbuttonpress()
plt.close()

### End code 



On 3 February 2012 15:21, Benjamin Root ben.r...@ou.edu wrote:



 On Friday, February 3, 2012, Pål Gunnar Ellingsen paa...@gmail.com
 wrote:
  Hi
 
  I've got a plot, containing a graph.
  I would like to look at certain parts of it.
  To do this I zoom in on the x-axis using set_xlim()
  Then I would like to call autoscale(axis='y') and have matplotlib
  autoscale the y axis within the current x-axis.
 
  I've tried several ways of doing this, both with autoscale and
 set_ylim(auto=True)
  but non of them have been able to do this, as they only autoscale y on
 the full graph.
  In the end I ended up writing my own code for calculating the new ymin
 and ymax ans using set_ylim([ymin, ymax]),
  but I feel that this should not be necessary.
 
  While googling for the a solution I found an earlier e-mail on the
 matplotlib list,
 
 http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg19664.html
  which describes the same problem, but was never answered.
 
  Is there any other solution for this that I've missed?
 
  Regards
 
  Pål
 

 Actually, the autoscaling is working as it should in your case.  By
 default, automatic limits will encompass all data plotted.

 The missing piece of your puzzle is specifying an aspect constraint.
  ax.set_aspect() will allow for some sort of relationship between the x and
 y axes to exist.  For example, setting it to 'equal' means that limits are
 chosen such that a distance on the x axis is displayed the same way as the
 same distance in the y-axis.  There are some other preset values and I
 think you can specify a float as well.

 This is what I can remember of the top of my head. I hope this helps!

 Ben Root
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] specgram memory problem

2012-02-03 Thread Fabrice Silva
Le vendredi 03 février 2012 à 12:11 +, David Craig a écrit :
 Hi, I am using matplotlib to produce some spectrograms for seismic
 data. I am looking at a 10 day period with a sample rate of 20sps. I
 would like to have my spectrogram to be composed of 10 minute windows
 with an overlap of 90%. However when I try and run my script I run out
 of memory. I can produce the spectrogram for a maximum of 3 days
 before an error occurs. 
 I have also tried to produce a spectrogram for each day and stick them
 together using subplot, but I then get the error given below. Anyone
 know a way around this??
 Thanks,
 David

It seems that the MemoryError does not occur when computing the
spectrogram, but when rendering it. A quick rule of a thumb tells me
that you have to display an image that is 12000x14400:
12000 frequencies, as you are using windows with 12000 samples
(no padded assumed)
14400 windows, due to the 90% overlap

Having a 4-channel for the RGBA image may throw the MemoryError.
Can you check by trying to imshow such an array ?
You can also reduce the overlap, the one you used lead to a spectrum
computation each minute...


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Setting x scale manually, but letting y scale automatic within the current x-axis

2012-02-03 Thread Benjamin Root
On Fri, Feb 3, 2012 at 9:15 AM, Pål Gunnar Ellingsen paa...@gmail.comwrote:

 Hi

 Thank you for trying to help me, though I can't see how aspect is going
 to help me. As I understand of the documentation, it would require me to
 know the
 relationship between x and y, which I don't.
 I can calculate it, but since it varies between each change in xlimits
 and different plot, it would be the same as calculating the ylimits.

 As for pyplot.xlim(xmin,xmax) (suggested by Ethan Swint), it does the same
 as ax.set_xlim() for me.

 Below is a sample code that will illustrate the problem.

 Regards

 Pål

 ### Start code 

 #!/usr/bin/env python
 import matplotlib
 matplotlib.use('Qt4Agg')   # generate postscript output by default

 import matplotlib.pyplot as plt
 import numpy as np

 # Creating a function to plot
 x = np.linspace(-10, 10, 200)
 p = np.poly1d([2, 3, 1, 4])
 y = p(x) * np.sin(x)

 # plotting the full figure
 fig = plt.figure()

 ax = fig.add_subplot(111)
 ax.plot(x, y)
 ax.autoscale(tight=True)
 plt.title('Full graph. (Press key for next plot)')
 plt.draw()

 plt.waitforbuttonpress()

 # This is how I'm currently doing it
 # x limits
 xmin = 2
 xmax = 6

 # Calculating y limits
 ymin = y[np.logical_and(xmin  x, x  xmax)].min()
 ymax = y[np.logical_and(xmin  x, x  xmax)].max()

 # Inserting some room
 room = np.maximum(np.abs(ymin * 0.05), np.abs(ymax * 0.05))
 ymin = ymin + room * np.sign(ymin)
 ymax = ymax + room * np.sign(ymax)

 # Setting the limits
 ax.set_xlim([xmin, xmax])
 ax.set_ylim([ymin, ymax])

 plt.title('What I want (Press key for next plot)')
 plt.draw()
 plt.waitforbuttonpress()

 # This is what pyplot does by default if I only set the limits
 ax.autoscale(tight=True)
 ax.set_xlim([2, 6])

 plt.title('What I get if I only use set_xlim (Press key for exit)')
 plt.draw()
 plt.waitforbuttonpress()
 plt.close()

 ### End code 



Ok, I see what you want.  You want the y-limits to automatically change to
fit only the data that is displayed for the x-domain you have chosen.

I have tried some tricks, and I am not sure that it is currently possible.
There might even be some sort of bug at play here because the function
ax.update_datalim() does not appear to update the internal data used for
autoscaling.  We might have to look into this further.

Ben Root
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Setting x scale manually, but letting y scale automatic within the current x-axis

2012-02-03 Thread Pål Gunnar Ellingsen
Hi

Yes you've understood my problem correctly.

Let me know if there is anything I can do to help solve this issue.

Regards

Pål

On 3 February 2012 17:07, Benjamin Root ben.r...@ou.edu wrote:



 On Fri, Feb 3, 2012 at 9:15 AM, Pål Gunnar Ellingsen paa...@gmail.comwrote:

 Hi

 Thank you for trying to help me, though I can't see how aspect is going
 to help me. As I understand of the documentation, it would require me to
 know the
 relationship between x and y, which I don't.
 I can calculate it, but since it varies between each change in xlimits
 and different plot, it would be the same as calculating the ylimits.

 As for pyplot.xlim(xmin,xmax) (suggested by Ethan Swint), it does the
 same as ax.set_xlim() for me.

 Below is a sample code that will illustrate the problem.

 Regards

 Pål

 ### Start code 

 #!/usr/bin/env python
 import matplotlib
 matplotlib.use('Qt4Agg')   # generate postscript output by default

 import matplotlib.pyplot as plt
 import numpy as np

 # Creating a function to plot
 x = np.linspace(-10, 10, 200)
 p = np.poly1d([2, 3, 1, 4])
 y = p(x) * np.sin(x)

 # plotting the full figure
 fig = plt.figure()

 ax = fig.add_subplot(111)
 ax.plot(x, y)
 ax.autoscale(tight=True)
 plt.title('Full graph. (Press key for next plot)')
 plt.draw()

 plt.waitforbuttonpress()

 # This is how I'm currently doing it
 # x limits
 xmin = 2
 xmax = 6

 # Calculating y limits
 ymin = y[np.logical_and(xmin  x, x  xmax)].min()
 ymax = y[np.logical_and(xmin  x, x  xmax)].max()

 # Inserting some room
 room = np.maximum(np.abs(ymin * 0.05), np.abs(ymax * 0.05))
 ymin = ymin + room * np.sign(ymin)
 ymax = ymax + room * np.sign(ymax)

 # Setting the limits
 ax.set_xlim([xmin, xmax])
 ax.set_ylim([ymin, ymax])

 plt.title('What I want (Press key for next plot)')
 plt.draw()
 plt.waitforbuttonpress()

 # This is what pyplot does by default if I only set the limits
 ax.autoscale(tight=True)
 ax.set_xlim([2, 6])

 plt.title('What I get if I only use set_xlim (Press key for exit)')
 plt.draw()
 plt.waitforbuttonpress()
 plt.close()

 ### End code 



 Ok, I see what you want.  You want the y-limits to automatically change to
 fit only the data that is displayed for the x-domain you have chosen.

 I have tried some tricks, and I am not sure that it is currently
 possible.  There might even be some sort of bug at play here because the
 function ax.update_datalim() does not appear to update the internal data
 used for autoscaling.  We might have to look into this further.

 Ben Root


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] many plots

2012-02-03 Thread Benjamin Root
On Fri, Feb 3, 2012 at 10:27 AM, Saurav Pathak sau...@sas.upenn.edu wrote:

 Hi All,

 First, thanks for a very cool and pretty tool!

 My problem is, I have a 2D numpy array, say m by n, and I would like to
 display the data in n plots (with the same abscissa).  That is, the 2D
 numpy array holds n time series data with m points each.  I could use
 pyplot.plot inside a loop to display it, but n is very large as a result
 of which it takes a long time to create the plot and display it.

 Is there another way to do this more efficiently?

 Thanks,
 Saurav


Just pass in the 2D array as the 'y' argument.  A line plot will be made
for each column in the 2D array and will even be automatically colored.
All lines will show up on the same axes.

Cheers!
Ben Root
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Setting x scale manually, but letting y scale automatic within the current x-axis

2012-02-03 Thread Eric Firing
On 02/03/2012 06:07 AM, Benjamin Root wrote:


 On Fri, Feb 3, 2012 at 9:15 AM, Pål Gunnar Ellingsen paa...@gmail.com
 mailto:paa...@gmail.com wrote:

 Hi

 Thank you for trying to help me, though I can't see how aspect is going
 to help me. As I understand of the documentation, it would require
 me to know the
 relationship between x and y, which I don't.
 I can calculate it, but since it varies between each change in xlimits
 and different plot, it would be the same as calculating the ylimits.

 As for pyplot.xlim(xmin,xmax) (suggested by Ethan Swint), it does
 the same as ax.set_xlim() for me.

 Below is a sample code that will illustrate the problem.

 Regards

 Pål

 ### Start code 

 #!/usr/bin/env python
 import matplotlib
 matplotlib.use('Qt4Agg')   # generate postscript output by default

 import matplotlib.pyplot as plt
 import numpy as np

 # Creating a function to plot
 x = np.linspace(-10, 10, 200)
 p = np.poly1d([2, 3, 1, 4])
 y = p(x) * np.sin(x)

 # plotting the full figure
 fig = plt.figure()

 ax = fig.add_subplot(111)
 ax.plot(x, y)
 ax.autoscale(tight=True)
 plt.title('Full graph. (Press key for next plot)')
 plt.draw()

 plt.waitforbuttonpress()

 # This is how I'm currently doing it
 # x limits
 xmin = 2
 xmax = 6

 # Calculating y limits
 ymin = y[np.logical_and(xmin  x, x  xmax)].min()
 ymax = y[np.logical_and(xmin  x, x  xmax)].max()

 # Inserting some room
 room = np.maximum(np.abs(ymin * 0.05), np.abs(ymax * 0.05))
 ymin = ymin + room * np.sign(ymin)
 ymax = ymax + room * np.sign(ymax)

 # Setting the limits
 ax.set_xlim([xmin, xmax])
 ax.set_ylim([ymin, ymax])

 plt.title('What I want (Press key for next plot)')
 plt.draw()
 plt.waitforbuttonpress()

 # This is what pyplot does by default if I only set the limits
 ax.autoscale(tight=True)
 ax.set_xlim([2, 6])

 plt.title('What I get if I only use set_xlim (Press key for exit)')
 plt.draw()
 plt.waitforbuttonpress()
 plt.close()

 ### End code 



 Ok, I see what you want.  You want the y-limits to automatically change
 to fit only the data that is displayed for the x-domain you have chosen.

This has never been supported; it would have to be a new option.  I 
suspect it would be quite difficult to get this right in general, even 
though the concept seems simple enough.

Eric


 I have tried some tricks, and I am not sure that it is currently
 possible.  There might even be some sort of bug at play here because the
 function ax.update_datalim() does not appear to update the internal data
 used for autoscaling.  We might have to look into this further.

 Ben Root



 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2



 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] macosx lion installation challenges

2012-02-03 Thread Friedrich Romstedt
 I am having troubles  getting matplotlib to install.  I have mac os X lion 
 with Xcode 4.2.1 installed and  I have used git to get the latest version of 
 matplotlib.  I am also running python 2.7.2 from the python.org site. The 
 installation process was going fine based on the make.osx file supplied .  
 The only thing I had to do was add a symbolic link to map gcc-4.2 to gcc to 
 get it to compile, the I hit the following problem:

So what do you mean precisely by the installation process was going fine if 
you hit that complile error? So it did't go fine AISI, no?

 In file included from src/ft2font.cpp:3:
 src/ft2font.h:16:22: error: ft2build.h: No such file or directory

AFAIR this means it did't find the freetype2 installation sources. Either it's 
some mistake in make.osx or you did one. Can't say anything emphatically at 
this stage. Normally the make.osx installs the freetype2 somewhere. 

 src/ft2font.h:17:10: error: #include expects FILENAME or FILENAME

You could have a look which include that is. I don't have the sources here. 

Sorry for the slow reply. 

Friedrich--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Adding lines around 3d bounding box?

2012-02-03 Thread Jacob Biesinger
Hi!

In matplotlib's 3d plotting, the three corners of the 3d cube closest to
the camera are used as the axis and receive tick marks, labels, and a dark
black line. Is it possible to have the black line and ticks show
simultaneously on the 3 far corners at the top of the cube?

For example, I'd like to have the top-left corner, top-right corner and
right side of this image be dark and include ticks, but not tick labels.

http://dl.dropbox.com/u/1299034/fig_example.png

Thanks!
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Adding lines around 3d bounding box?

2012-02-03 Thread Benjamin Root
On Friday, February 3, 2012, Jacob Biesinger jake.biesin...@gmail.com
wrote:
 Hi!
 In matplotlib's 3d plotting, the three corners of the 3d cube closest to
the camera are used as the axis and receive tick marks, labels, and a dark
black line. Is it possible to have the black line and ticks show
simultaneously on the 3 far corners at the top of the cube?
 For example, I'd like to have the top-left corner, top-right corner and
right side of this image be dark and include ticks, but not tick labels.
 http://dl.dropbox.com/u/1299034/fig_example.png
 Thanks!


Unfortunately, that level of customization is not in the design of mplot3d.
 It it possible that it may happen in future releases as I work to bring
mplot3d into feature-parity with regular axes, it won't happen soon.

Now, that doesn't mean that it is impossible to do right now, but it would
require hacking the axis3d.py file.  For each axis, a panel is drawn (which
is what you see now).  It is possible to simply have it plot a second
(transparent) panel on the far side with a black outline.  Next, there is a
loop that makes the ticks and the labels at the same time.  Just duplicate
that loop, but for the far edge and exclude the labels.

Sorry I can't be of more help right now, but I hope this info gets you
where you need to be.

Cheers,
Ben Root
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Why pixel marker size is 4 pixels?

2012-02-03 Thread Chris
I noticed this a few years back, but left it aside because most of the
time I can live with it.  Recently I need to make a few plots
containing a few million points, and 4 pixels for a point is a
disaster.  So my question is why the pixel marker size is set at 4
pixels?  And is there anyway to change it to a single pixel?

Thanks,
Chris

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users