something like:
fig.add_axes([0.1, 0.1, 0.8, 0.8], preserve_absolute_margins=True)
If this would be useful, I can open a pull request.
Cheers,
Tom
On 9 September 2015 at 23:29, Thomas Robitaille
wrote:
> Thanks Eric - unfortunately I need to be able to resize the figure
> interactively an
ld be easy to build as an Axes subclass?
Cheers,
Tom
On 9 September 2015 at 23:12, Eric Firing wrote:
> On 2015/09/09 11:01 AM, Thomas Robitaille wrote:
>>
>> Hi everyone,
>>
>> I am interested in creating axes in an interactive figure where the
>> distance fro
Hi everyone,
I am interested in creating axes in an interactive figure where the
distance from the spines of the axes to the figure edge are constant
in absolute terms.
To clarify what I mean, when using add_axes([0.1, 0.1, 0.8, 0.8]), the
spines of the axes are always located a distance from the
Hi Thomas,
Are there also already plans to change the default color cycle?
Changing to one of the qualitative color sequences from colorbrewer2
would be a very nice change in defaults, but I am presuming that this
has already been suggested?
Cheers,
Tom
On 12 July 2015 at 18:11, Thomas Caswell
Hi everyone,
I have just released a small plugin for py.test that wraps the image
comparison functionality in matplotlib.testing, for use in other
packages that use py.test as the testing framework instead of nose:
https://github.com/astrofrog/pytest-mpl
The idea is to make it easy to write a
Hi everyone,
If you use scientific Python packages for your research/work, I would
appreciate if you could take a few minutes to fill out the following
survey:
http://goo.gl/PXzFAk
The aim of this survey is to find out what versions of Python and
various scientific Python packages people are u
Hello,
I am interested in using the Matplotlib transformation framework to
transform a rectangle into a different coordinate system. I am therefore
defining a Rectangle patch and setting the transform to what I want. If
I apply a non-linear transformation, the edges of the rectangle should
no long
Hi everyone,
I'm developing a simple GUI tool in Matplotlib that relies on the
event framework to handle buttons/sliders. I am trying to avoid using
a GUI toolkit directly to ensure maximum compatibility for users.
One thing I would like is to be able to have a 'save' button that will
open up a s
June 2013 16:13, Michael Droettboom wrote:
> Have you tried using "draw_idle"? That will schedule the draw for the
> next time the event loop is idle.
>
> Mike
>
> On 06/24/2013 07:39 AM, Thomas Robitaille wrote:
>> Hi everyone,
>>
>> The following
Hi everyone,
The following shows an example of a simple data viewer which includes
a slider, a bitmap, and a scatter plot:
"""
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.widgets import Slider
fig = plt.figure()
ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.7])
image = ax1.im
Hello,
I am trying to build the latest version of matplotlib from the git repository
(1cd07a6c) on MacOS 10.7, and regardless of whether I build using the make.osx
file or just 'python setup.py build', the C files get compiled with clang, and
clang raises an error on one of the files:
/Develop
Hi,
I've found a bug in imread which causes images in PNG and JPEG format to be
flipped when using imshow. For example,
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1,2,1)
image = plt.imread('2mass_rgb.png')
ax.imshow(image, ori
/issues/85
Cheers,
Tom
On Friday, April 15, 2011 at 7:22 PM, Thomas Robitaille wrote:
Hello,
>
> It seems that at some point in the last few months a change was made that
> means that the following code no longer works properly:
>
> ---
>
> import matplotlib as mpl
>
Hello,
It seems that at some point in the last few months a change was made that means
that the following code no longer works properly:
---
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
mpl.rc('text', usetex=True)
fig = plt.figure()
ax = fig.add_a
Hi,
The following code causes matplotlib to hang:
---
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.patches import Circle
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.add_patch(Circle((1.e17, 1.e17), radius=1.e15))
fig.savefig('
> and replace "pswrite" with "ps2write".
>
> Regards,
>
> -JJ
>
>
>
>
> On Sun, Mar 13, 2011 at 1:45 AM, Thomas Robitaille
> wrote:
>> Hi Jae-Joon,
>>
>> Ok, that makes sense - I tried upgrading to 9.0.1 and it looks like there
Hi,
If I use interpolation='nearest' in an imshow command, when I try and save the
image using savefig, the dpi= argument seems to have no effect. I have created
a bug report on GitHub:
https://github.com/matplotlib/matplotlib/issues/83
Thanks for any help,
Tom
Hi,
I would like to set the zorder on a collection e.g. PatchCollection. By looking
at the matplotlib source code in collections.py, I figured that it would be
possible to set the zorder attribute of a collection manually, e.g.
p = PatchCollection(...)
p.zorder = ...
but I was wondering whethe
rds,
>
> -JJ
>
>
>
> On Sat, Mar 12, 2011 at 2:46 AM, Thomas Robitaille
> wrote:
>> Hi Jae-Joon,
>>
>> I tried inserting:
>>
>> mpl.rc('ps', usedistiller=None)
>>
>> after importing matplotlib, and I get:
>>
e ~4M in size.
>
> Can you check if the file size varies significantly with rc parameters
> ps.usedistiller?
> I'm not sure how text setting can affect the images.
>
> Regards,
>
> -JJ
>
>
>
> On Tue, Mar 1, 2011 at 7:23 AM, Thomas Robitaille
>
Hi,
In the following example:
---
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.imshow(np.random.random((1024, 1024)), interpolation='nearest')
fig.savefig('test_1.eps')
mpl.rc('text', usetex=True
Hi,
I am using matplotlib with the MacOSX backend. If I run:
import matplotlib
matplotlib.use('MacOSX')
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
the cursor coordinates are missing from the bottom right of the window. If I
click on the figure, the coordinat
Hi,
Is there a way to prevent the matplotlib install from trying to compile for ppc
for the c++ compiler? I usually set
export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-arch i386 -arch x86_64"
export CPPFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-arch i386 -arch x86_64"
export LDFLAGS="-
Hi,
When using log scale, if the error is larger than flux, the error bar does not
plot at all:
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.errorbar([1.],[1.],yerr=[2.])
ax.set_yscale('log')
fig.savefig('test.png')
Hi,
How does one plot an arrow in a log log plot? In the following example, I can't
get the arrow head, regardless of what value I use for the head width:
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.arrow(0.2,0.2,0.5,
Hello,
I updated to svn r8396 today, and the MacOSX backend is broken. The following
code
import matplotlib
matplotlib.use('MacOSX')
import matplotlib.pyplot as mpl
fig = mpl.figure()
ax = fig.add_subplot(1,1,1)
fig.canvas.draw()
produces the following error:
File "/Users/tom/Library/Python
Hello,
I have run into a problem with the bbox_inches='tight' option which allows a
tight bounding box to be computed for a plot. In the following example:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
fig = mpl.figure()
ax = fig.add_subplot(1,1,1)
ax.text(-0.2,0.5,'te
Hi,
I'm having issues with translucent patches. The following code
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
from matplotlib.patches import Circle
fig = mpl.figure()
ax = fig.add_subplot(111)
c = Circle((0.25,0.5), radius=0.2, facecolor='none', edgecolor='green',
a
Hello,
I am currently using the sphinxext module to write documentation that includes
automatically generated plots. I was wondering if there is a way to override
the default savefig behavior for this - for example, I would like all the plots
for the documentation to have the bbox_inches='tight
Hi,
Last year, I submitted a bug report regarding the fact that PatchCollection's
match_original argument does not work properly, in a pretty simple script:
https://sourceforge.net/tracker/?func=detail&aid=2881485&group_id=80706&atid=560720
I came across the problem again several times recently
Hi,
In the following script:
---
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
fig = mpl.figure()
ax = fig.add_subplot(1,1,1)
for line in ax.xaxis.get_ticklines():
line.set_markersize(20)
line.set_linewidth(10)
line.set_linestyle('dashed')
fig.savefig('t
Hi,
I have been trying to use the Affine2D transformation with pcolor and contour,
with no success. The following script and comments illustrates my problems:
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
from matplotlib.transforms import Affine2D
import numpy as np
image = np.random.ra
"fix some issues in the bbox after
> the postscript distiller is run". This change removed a commented out call
> to ps2eps. I'm a bit out of my depth here as to why that change was made,
> and why .eps files seemingly haven't been true .eps files for a long time
? What version of LaTeX is this?
>
> Mike
>
> Thomas Robitaille wrote:
>> Hello,
>>
>> I upgraded to the latest svn version of matplotlib today, and found that eps
>> files produced with the system latex now seem to be invalid. For example, if
Thomas Robitaille wrote:
>
> It looks like the zlib website removes previous version of its library
> that were previously available for download, so the part in make.osx where
> http://www.zlib.net/zlib-1.2.3.tar.gz is fetched now fails (since the
> current version is 1.2.4). T
Hello,
I upgraded to the latest svn version of matplotlib today, and found that eps
files produced with the system latex now seem to be invalid. For example, if I
run the following script
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
mpl.rc('text', usetex=False)
fig
a
>ax2.add_collection(c)
>
> should work.
>
> Regards,
>
> -JJ
>
>
>
>
> On Mon, Mar 29, 2010 at 12:24 PM, Thomas Robitaille
> wrote:
>> Hello,
>>
>> In the following example, I am trying to copy over existing collections from
Hello,
In the following example, I am trying to copy over existing collections from
one plot to another:
import matplotlib.pyplot as mpl
fig = mpl.figure()
ax1 = fig.add_subplot(1,1,1)
ax1.scatter([0.5],[0.5])
fig.savefig('test1.png')
fig = mpl.figure()
ax2 = fig.add_subplot(1,1,1)
for c in ax
Hello,
It looks like the zlib website removes previous version of its library that
were previously available for download, so the part in make.osx where
http://www.zlib.net/zlib-1.2.3.tar.gz is fetched now fails (since the current
version is 1.2.4). The error in the matplotlib building is not e
ing
> over major_ticks, you do
>
> cax.axis["left"].toggle(all=False)
> cax.axis["right"].toggle(all=True)
>
> Regards,
>
> -JJ
>
>
> On Fri, Mar 5, 2010 at 9:38 AM, Thomas Robitaille
> wrote:
>> Hi Jae-Joon,
>>
&g
axes_locator (take a look at demo_locatable_axes_easy function in the
> example below)
>
> http://matplotlib.sourceforge.net/examples/axes_grid/demo_axes_divider.html
>
> -JJ
>
>
>
>
> On Thu, Mar 4, 2010 at 9:05 PM, Thomas Robitaille
> wrote:
>> Hi,
>>
>> I a
er function that utilizes
> axes_locator (take a look at demo_locatable_axes_easy function in the
> example below)
>
> http://matplotlib.sourceforge.net/examples/axes_grid/demo_axes_divider.html
>
> -JJ
>
>
>
>
> On Thu, Mar 4, 2010 at 9:05 PM, Thomas Robitaille
>
Hi,
I am trying to set up a colorbar that automatically resizes if I zoom in to an
image (which changes the aspect ratio of the axes, so I want the colorbar to
get resized too). Let's say I have two Axes instances, say ax (for the main
image) and cax (for the colorbar). I can set up a callback
Hi,
I would like to change the orientation of a colorbar once it has already been
drawn. So for example if I create the colorbar with:
cb = fig.colorbar(mappable=image, cax=cax, orientation='vertical')
I would like to be able to do
cb.set_orientation('horizontal')
Is there a way to do this, s
Hello,
I'm trying to make a log plot using set_xscale and set_yscale. The default
LogFormatter however shows 10^-1, 10^0, and 10^1 rather than 0.1, 1, and 10
(other plotting packages I've used usually automatically substitute these three
common labels). Is there a way that the LogFormatter coul
Hi,
I would like to plot a colorbar which automatically gets resized when
I change the view limits and the aspect ratio of the main axes. So for
example:
import matplotlib.pyplot as mpl
import numpy as np
fig = mpl.figure()
ax = fig.add_axes([0.1,0.1,0.7,0.8])
cax = fig.add_axes([0.81,0.1,0.
rrows are drawn.
>
> http://matplotlib.sourceforge.net/users/annotations_guide.html#annotating-with-arrow
>
> -JJ
>
>
> On Thu, Nov 19, 2009 at 9:46 AM, Thomas Robitaille
> wrote:
>> Hello,
>>
>> I'm trying to plot two perpendicular arrows and getting
Hello,
I'm trying to plot two perpendicular arrows and getting them to start
from the exact same point. If I try the following:
---
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
from matplotlib.patches import FancyArrowPatch
fig = mpl.figure()
ax = fig.add_subplot(
Hi,
Is there an easy way to add axes to a figure, but specify the 'rect'
in real rather than relative units? For example, something like:
fig.add_axes([0.5,0.5,3.,3.], inches=True)
This would guarantee that for example if I want to increase the canvas
size to add more subplots, I don't have
Hi,
I'm trying to plot a horizontal colorbar with labels on top. I can use
axcbar = fig.add_axes([0.2, 0.85, 0.6, 0.03])
axcbar.xaxis.set_ticks_position('top')
cbar = fig.colorbar(s, cax=axcbar, orientation='horizontal')
but then I lose the ticks on the bottom of the colorbar. However,
setting
Hi,
I'm not sure what I'm doing wrong here:
import matplotlib.pyplot as mpl
from matplotlib.ticker import NullFormatter
fig = mpl.figure()
ax = fig.add_subplot(111)
ax.xaxis.set_major_formatter(NullFormatter)
This returns the error:
Traceback (most recent call last):
File "test.py", line 6,
Hello,
The make.osx file is now required (or at least recommended) to build
matplotlib on MacOS X, but the file is absent from the 0.9.1 RC1
tarfile. Is this an oversight, or is it deliberate?
Thanks,
Thomas
--
Com
> I think the easiest solution is to override the Axes.format_coord.
> For example,
>
> ax = gca()
> ax.format_coord = lambda x,y : "x=%g y=%g" % (x, y)
>
> x,y are in data coordinate. I'm not sure if there is any side effect,
> but it seems that the format_coord method is only used to display
Hi,
I'm interested in controlling how the cursor position appears at the bottom
of interactive windows.
I noticed that by default, it is the Formatter that gets called. However, in
my case, the displayed coordinates each depend on both the x and y pixel
value, and therefore I need to somehow ove
Hi,
Is there an easy way to force a colorbar to not take up space from the Axes
it is being plotted next to? In the following example, what I would like is
for the top Axes to remain the same size as the bottom one, and for the
colorbar to place itself on the right of the top one. Is this easy to
Matthias Michler wrote:
>
>
> #
> import numpy as np
> import matplotlib.pyplot as plt
>
> # generate some data on log-scale
> x = 10**np.random.uniform(size=1000)
> # histogram with log-bining
> plt.hist(x, bins=10**np.linspace(0, 1, 10))
> plt.xscale('log')
> plt.show
Just a quick note - the last script in my previous email is wrong. I don't
get the problem in that case, I get it if the arrays are 32-bit:
import matplotlib.pyplot as mpl
import numpy as np
np.random.seed(-12421412)
x = np.random.random(1).astype(np.float32)
y = np.random.random(1).as
Hi,
The following script produces a single point that is green and translucent:
import matplotlib.pyplot as mpl
fig = mpl.figure()
ax = fig.add_subplot(111)
ax.scatter([0.],[0.],c=1.,alpha=0.2,vmin=0,vmax=2.0,cmap=mpl.cm.jet)
fig.canvas.draw()
and the following script produces a single point t
Hi,
What is the easiest way to plot a histogram with a logarithmic x-axis? The
Axes.hist() method takes a log=True/False argument, but this applies only to
the y axis.
Is the only solution to plot a histogram of np.log10(array) and to change
the tick formatter to a Log formatter, or is there a m
John Hunter-4 wrote:
>
> On Thu, Feb 12, 2009 at 2:13 PM, Ryan May wrote:
>> On Wed, Feb 11, 2009 at 7:30 PM, John Hunter wrote:
>>>
>>> On Wed, Feb 11, 2009 at 2:49 PM, Ryan May wrote:
>
>> Well, I checked in an example that shows the functionality. The problem
>> is
>> that using these ev
around.
>
> Regards,
>
> -JJ
>
>
> On Sun, Jun 21, 2009 at 1:09 PM, Thomas
> Robitaille wrote:
>>
>> Hi,
>>
>> I'm trying to use the scatter method, making use of the option to
>> specify
>> the marker as a tuple. From the documentation
Hi,
I'm trying to use the scatter method, making use of the option to specify
the marker as a tuple. From the documentation, it would seem that specifying
marker=(0,3,0) should draw a circle. However, this is not the case. If you
consider the following code:
import matplotlib
matplotlib.use('Agg
Hello,
I was wondering whether there is an easy way to find out the svn
revision number of matplotlib in python. I tried:
In [2]: matplotlib.__revision__
Out[2]: '$Revision: 6887 $'
but this isn't actually the current revision number, I have upgraded
to 7096 (I'm suspecting that 6887 is the
Hello,
I'm having a strange issue, and I've managed to reduce it to a simple
problem. I created the following file structure:
- a directory named scripts/
- a script called scripts/inspect.py
- a script called scripts/test.py
inspect.py contains just 'pass' and test.py contains 'from
matplot
Hello,
The following code should produce identical plots, but in the second
case the alpha value is ignored:
---
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
from matplotlib.patches import Ellipse
from matplotlib.collections import PatchCollection
fig = mpl.figure()
Hi Mike,
Thanks for pointing this out - I hadn't noticed the offsets argument.
I'll try it out!
Cheers,
Tom
On May 6, 2009, at 10:39 AM, Michael Droettboom wrote:
> "offsets" is intended to work for this. Is it broken?
>
> Cheers,
> Mike
>
> Thomas Ro
Hi,
I noticed that it's not possible to specify the position of the
ellipses in an EllipseCollection:
http://matplotlib.sourceforge.net/api/collections_api.html?highlight=ellipsecollection#matplotlib.collections.EllipseCollection
Of course, I can just create a collection of individual Ellipse
Not sure if this will help, but maybe you can do something like this?
---
#!/usr/bin/env python
from pylab import *
from scipy import *
img = standard_normal((40,40))
image = imshow(img,interpolation='nearest',animated=True,label="blah")
for k in range(1,1):
img = standard_normal((40,4
There was a typo in the script, the callbacks should be
ax.name = "first axis"
ax.callbacks.connect('xlim_changed',check_callback)
ax.callbacks.connect('ylim_changed',check_callback)
ax2 = ax.twin()
ax2.name = "second axis"
ax2.callbacks.connect('xlim_changed',check_callback)
ax2.callbacks
I've realized that using the ParasiteAxes from the mpl_toolkits should do
exactly what I'm asking. However, I am having a problem with callbacks when
the x and y limits change (try resizing the window). The following script
shows that the callback for the second set of axes is not carried out. Is
Thanks!
Thomas
On 1 May 2009, at 15:04, Eric Firing wrote:
> Christopher Barker wrote:
>> Eric Firing wrote:
>>> Split the command up:
>>> p = Circle(...)
>>> ax.add_patch(p, ...)
>>>
>>> (add_* could be modified to return the reference; maybe this would
>>> be
>>> worthwhile.)
>>
>> +1
>>
>>
der if others can test this.
>>
>> -JJ
>>
>>
>> On Thu, Apr 30, 2009 at 9:32 AM, Michael Droettboom
>> wrote:
>>
>>> I forwarded this message to Michiel de Hoon, the author of the Mac
>>> OS-X
>>> backend, in case he has any
Hello,
I want to create two sets of axes for a figure that would be
equivalent to
ax = fig.add_subplot(111)
ax2 =
ax
.figure
.add_axes(ax.get_position(True),frameon=False,sharex=ax,sharey=ax)
except that I want to be able to specify different tick locators and
formatters for ax and ax2.
Hi Jae-Jong and John,
Thanks for your replies! While experimenting with this to send
screenshots, I realized that my default backend was set to MacOSX, not
WXAgg. The WXAgg output to the screen actually agrees with the PNG
output in terms of font sizes. But the font sizes differ between the
,
Thomas
On 29 Apr 2009, at 21:13, Eric Firing wrote:
> Thomas Robitaille wrote:
>> Hi,
>> Is there an easy way to draw a patch or a patchcollection such that
>> it always stays at the same relative position in a set of axes,
>> rather than at the same pixel positi
Hi,
Is there an easy way to draw a patch or a patchcollection such that it
always stays at the same relative position in a set of axes, rather
than at the same pixel position? So for example, I would want to plot
it at (0.1,0.1) relative to the axes, and if I zoom in I would still
want it
toolbar.save to actually point to my custom
savefig?
Thanks!
Thomas
On 28 Apr 2009, at 11:57, John Hunter wrote:
>
>
> On Tue, Apr 28, 2009 at 8:21 AM, Thomas Robitaille
> > wrote:
> Hi,
>
> I was wondering if it is possible to override the 'save' button in
> wxA
adjust label position.
> e.g.
>
> import pylab
> hAxes = pylab.axes()
> pylab.xlabel('test')
> hAxes.xaxis.LABELPAD = 0
> pylab.show()
>
> --
> Yong-Duk Jin
>
> On Tuesday 28 April 2009 14:08:50 Thomas Robitaille wrote:
>> Hi,
>>
>> T
Hi,
I am using the savefig method to save plots - however, I am finding
that the font size is systematically larger in the saved images than
in the WxAgg window. It seems that text is ~30% larger in PNG and PDF
files compared to the WxAgg display (relative to the axes box size).
This can b
Hi,
I was wondering if it is possible to override the 'save' button in
wxAgg so that once a filename has been specified in the dialog, a
custom function is run instead of the default savefig? Maybe this
would require too much hacking?
Thanks for any advice,
Thomas
Hi Jouni,
Thanks for your help! Following what you suggested, I've decided to use
ax.text(0.5,-0.13,xlabel,transform
=ax.transAxes,ha='center',va='center')
Thanks,
Thomas
On 28 Apr 2009, at 01:39, Jouni K. Seppänen wrote:
> Thomas Robitaille writes:
>
>&g
Hi,
This is probably a simple question, but what is the best way to
control the vertical positioning of the x-axis label? I tried:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
fig = mpl.figure()
ax = fig.add_subplot(111)
ax.set_xlabel("Hello",position=(0.5,-0.2))
fig
It works great now - thanks for fixing this!
Thomas
On Apr 23, 2009, at 10:29 AM, Michael Droettboom wrote:
> I think Jae-Joon's assesment is correct, since the logical dpi in PS
> is hardcoded to 72.0. I have made this change in the SVN repository.
>
> Mike
>
>
Hello,
I am having a problem with imshow and PNG output. The following code
can reproduce the problem:
---
import matplotlib
matplotlib.use('Agg')
from matplotlib.pyplot import *
import numpy as np
image = np.random.random((100,100))
fig = figure(figsize=(4,4))
ax = fig.add_subplot(111)
ax.
ter insight though.
>
> Regards,
>
> -JJ
>
>
>
> On Tue, Apr 21, 2009 at 9:59 AM, Thomas Robitaille
> wrote:
>> Hi,
>>
>> I've come across a bug with the savefig method when using the dpi=
>> argument and saving an EPS file. If you try the followi
Hi,
I've come across a bug with the savefig method when using the dpi=
argument and saving an EPS file. If you try the following code, you
will see that the frame is incomplete. Is there a way to solve this
from a user point of view?
---
import matplotlib
matplotlib.use('Agg')
from matplot
Hi,
A while ago, I sent an email around asking about the EPS output from
matplotlib. The following example summarizes the problem well:
import matplotlib
matplotlib.use('Agg')
from matplotlib.pyplot import *
import numpy as np
nx,ny = 10,10
image = np.random.random((nx,ny))
fig = figure(fig
Hi,
I've found that the match_original=True option in PatchCollection
causes matplotlib to crash. I have submitted two bug reports:
https://sourceforge.net/tracker/?func=detail&aid=2732455&group_id=80706&atid=560720
https://sourceforge.net/tracker/?func=detail&aid=2723527&group_id=80706&atid=56
> image.set_clim(vmin=10)
This works great - thanks!
Thomas
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/list
Hello,
I am plotting a numpy array with
image = imshow(array,vmin=0,vmax=100)
If I want to change the array, I can then do
image.set_data(new_array)
and I can also update the colormap, etc. But I can't find any options
to update the vmin and vmax values. Am I missing something? What I am
l
he output is not
properly handled for PS files. Is this something that could be fixed
in future?
Thanks,
Thomas
On Mar 31, 2009, at 4:32 PM, John Hunter wrote:
> On Tue, Mar 31, 2009 at 2:56 PM, Thomas Robitaille
> wrote:
>> Hello,
>>
>> I am using matplotlib to create
=(4,4))
ax = fig.add_subplot(111)
ax.pcolor(image)
fig.savefig('plot.ps')
produces a 2Mb+ file.
Thanks,
Thomas
On Mar 31, 2009, at 4:32 PM, John Hunter wrote:
> On Tue, Mar 31, 2009 at 2:56 PM, Thomas Robitaille
> wrote:
>> Hello,
>>
>> I am using matplot
Hello,
I am using matplotlib to create postscript and SVG files. I am
currently using imshow to show the contents of an array, but this
means that when saving vector graphics files, matplotlib resamples the
image/array onto a finer grid. What I would like, is for code such as
this:
import
ax.imshow(im,transform=tr)
>> fig.canvas.draw()
>> Am I doing something wrong?
>> Thanks!
>> Thomas
>> On Mar 13, 2009, at 5:20 PM, Andrew Straw wrote:
>>> Eric Firing wrote:
>>>> Thomas Robitaille wrote:
>>>>> Hello,
>>&
wrote:
> Eric Firing wrote:
>> Thomas Robitaille wrote:
>>> Hello,
>>>
>>> I was wondering whether there is a way to rotate a grayscale/
>>> colorscale when using imshow.
>>>
>>> I have been using PGPLOT (a fortran/c plotting library) for man
D
im = np.random.random((10,10))
tr = Affine2D().rotate_deg(45.)
fig = figure()
ax = fig.add_subplot(111)
ax.imshow(im,transform=tr)
fig.canvas.draw()
Am I doing something wrong?
Thanks!
Thomas
On Mar 13, 2009, at 5:20 PM, Andrew Straw wrote:
> Eric Firing wrote:
>> Thomas Robitaille wrote:
>&g
Hello,
I was wondering whether there is a way to rotate a grayscale/
colorscale when using imshow.
I have been using PGPLOT (a fortran/c plotting library) for many years
now, and the equivalent to imshow is called PGGRAY (or PGIMAG). One of
the arguments this function takes is a 6-element ar
Hi Eric,
I'm using matplotlib 0.98 (which comes with the Enthought distribution)
so that would explain why there was an issue.
Thanks for your help!
Thomas
Eric Firing wrote:
> Thomas Robitaille wrote:
>> Hi Eric,
>>
>> Thanks for your help! Unfortunately, ax.se
:
> Thomas Robitaille wrote:
>> Hello,
>>
>> I am using matplotlib to show an image using:
>>
>> fig = figure()
>> ax = fig.add_subplot(111)
>> ax.imshow(image)
>>
>> After doing this, I want to find the contours for a different image
>
Hello,
I am using matplotlib to show an image using:
fig = figure()
ax = fig.add_subplot(111)
ax.imshow(image)
After doing this, I want to find the contours for a different image
(with different dimensions), but I do not want to interact with the
current figure or axes, I just want to retriev
1 - 100 of 104 matches
Mail list logo