You may need to remove the alpha=0.05 or set it as 1 I think.
Chao
On Mon, Aug 3, 2015 at 12:51 AM, albad17 [via matplotlib] <
ml-node+s1069221n45995...@n5.nabble.com> wrote:
> For some reason when I plot a scatter plot like this:
>
> plt.scatter(diamonds['carat'], diamonds['price'], color = 'bl
Hi Michelle,
I might not fully understand your problem, could you have a look at this
thread and see if it helps?
http://matplotlib.1069221.n5.nabble.com/Fwd-Strange-behaviour-on-plotting-data-on-Ronbinson-projection-using-Basemap-td43222.html#a43233
Cheers,
Chao
On Wed, Aug 27, 2014 at 9:58
Hi Andruska,
The Basemap.colorbar has a "size" keyword to allow you have the shrink-like
function to adjust the size of the colorbar.
Otherwise you can creat an axes on the exact position you want to hold the
colorbar, like below I have prepared an example for you:
arr = np.arange(100).reshape(10
gt;
>
> On Mon, Apr 21, 2014 at 3:33 PM, ChaoYue <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=43265&i=0>
> > wrote:
>
>> Hi all,
>>
>> Thank you all for your kind response. I am sorry, but none of these
>> solutions significantly
Hi all,
Thank you all for your kind response. I am sorry, but none of these
solutions significantly improved the visual quality on microsoft powerpiont
2007. Thought I didn't try eps. So probably l have to go with the current
quality.
here is a best case I have now:
https://www.dropbox.com/s/0uhjo
com> wrote:
> On 2014/03/01 11:03 AM, ChaoYue wrote:
> > The most correct way might be to design a new colormap with white color
> > exactly in the middle, however this is very tedious, especially if I
> > want to try
> > different colormaps. so the alternative appr
Hi Eric,
thanks for answering. I updated the attached figure.
The idea is, we want to show the tree cover difference, but to make
the negative and positive values very contrastive, we would like to
assign the values falling in small range of change (in the figure, it's -1
to 1)
as blank (or gray),
Hi Gabriele,
I'm afraid you have to put the numbers by yourself using the plt.text, as
in an example:
a = np.arange(10)
b = np.tile(a,(10,1))
c = np.tile(a[:,np.newaxis],(10)) + b
plot(c)
for i in range(10):
plt.text(5,c[i][5],str(i))
I've askd by a review to use the colorblind compatible co
Hi Michael,
so finally how it goes? I may use something similar, do you finally make it?
cheers,
Chao
--
View this message in context:
http://matplotlib.1069221.n5.nabble.com/way-to-copy-an-axes-object-into-different-figures-tp41623p42203.html
Sent from the matplotlib - users mailing list ar
Hi,
I am using mat 1.20 and basemap 1.0.5, I tried your code and don't have the
same issue.
Chao
On Tue, Aug 6, 2013 at 9:33 AM, vwf [via matplotlib] <
ml-node+s1069221n41721...@n5.nabble.com> wrote:
>
> Hello,
>
> This weekend I started using matplotlib and I think it is great.
> Beautiful gra
could you use the bbox_to_anchor keyword to place your legend in a precise
way so that they could be alignd?
sorry ,this is the only way I could think of (But I am not a real expert in
matplotlib)
Chao
On Sun, Aug 4, 2013 at 5:45 PM, Tyrax [via matplotlib] <
ml-node+s1069221n41704...@n5.nabble.co
otlib] <
ml-node+s1069221n41615...@n5.nabble.com> wrote:
> Chao,
>
> You are right, fig.add_subplot does not support precise positioning. Why
> don't you send a picture of a sample layout you have obtained with
> add_axes?
>
> -Sterling
>
> On Jul 26, 2013, at
Dear Sterling,
thanks for your answer. The idea is that I would like to add a subplot with
precise position, as in the method of fig.add_axes?
Does fig.add_subplot support this, I tried
fig.add_subplot(position=(0.2,0.2,0.1,0.1)) but it does not work...
thanks!
Chao
On Thu, Jul 25, 2013 at 8:09
Thanks Ben. I tried but still confused.
In [8]: fig,ax = plt.subplots()
In [9]: ax.plot(range(100))
Out[9]: []
In [10]: ax.get_xticks()
Out[10]: array([ 0., 20., 40., 60., 80., 100.])
In [11]: ax.get_yticks()
Out[11]: array([ 0., 20., 40., 60., 80., 100.])
In [12]: draw()
Thanks Ben. extendrect keyword is in mat 1.3, I didn't try this but I tried
set_under and extend='min'
with mat 1.2 and it works very nice.
cheers,
Chao
On Tue, Jul 2, 2013 at 4:14 PM, Benjamin Root-2 [via matplotlib] <
ml-node+s1069221n41364...@n5.nabble.com> wrote:
> There is the "set_over" a
wrote:
> Perfect!! Many thanks!
>
>
> 2013/5/25 ChaoYue [via matplotlib] <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=41131&i=0>
> >
>
>> Is this what you want?
>>
>> I change a bit of the code and put some example data t
0.7, 1.05, 0.1))
>
> right_ax.set_xlim(0.71, 1)
>
>
>
>
>
> All what I need now is to manipulate the ylim of the truncated subplot
> (independently for the left and right y axes). plt.ylim(300, 500) only
> modifies the right yaxis of the truncated plot, not the le
Chao,
>
> Please find attached the script which includes your 3 functions, and a
> plot that I've just made. The things I can't manage to do are listed in the
> TODO section (end of the script)
>
>
> Cheers,
> Mat
>
>
>
>
> 2013/5/24 ChaoYue [via matplot
Hi, could you send an attachment to show what you've achieved so far?
Chao
--
View this message in context:
http://matplotlib.1069221.n5.nabble.com/Is-it-possible-to-truncate-axes-in-matplotlib-tp41092p41122.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
---
returns 'PathCollection' object,
> whatever that is.
> How can I grab handles to individual legend items to move them under ax2
> like in your
> hist-plot example?
>
> Thank you for your help,
> Martin
>
>
> ChaoYue wrote:
>
> > Dear Martin,
> &
o
On Wed, May 22, 2013 at 1:03 PM, Martin Mokrejs [via matplotlib] <
ml-node+s1069221n41104...@n5.nabble.com> wrote:
> Hi Chao,
>
> ChaoYue wrote:
> > Dear Martin,
> >
> > I worked out a similar example for your reference as I don't catch your
> example
Hi Mat,
this has been asked before. see here:
http://matplotlib.1069221.n5.nabble.com/quot-zig-zag-quot-to-represent-suppressed-0-on-axis-td40849.html#a40858
cheers,
Chao
On Mon, May 20, 2013 at 8:29 PM, mat [via matplotlib] <
ml-node+s1069221n41092...@n5.nabble.com> wrote:
> Dear community,
>
Dear Martin,
I worked out a similar example for your reference as I don't catch your
example very well.
fig =
plt.figure()
ax1 =
fig.add_subplot(211)
ax2 =
fig.add_subplot(212)
arrlist = [np.random.normal(size=100) for i in
range(50)]
ret =
ax1.hist(arrlist,histtype='barstacked')
reclist = [patch
Forwarded message --
> From: Scott Sinclair <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=40977&i=0>>
>
> Date: 30 April 2013 13:20
> Subject: Re: [Matplotlib-users] Basemap plotting data on projection
> To: ChaoYue <[hidden
Hi all,
Indeed it's a bit strange, I can reproduce the problem. But when using
'cyl' projection I don't have this issue.
attahced two figures showed the difference.
the tested data is also attached.
complete code is below:
from mpl_toolkits.basemap import Basemap, cm, maskoceans
import matplotl
I'm afraid the scatter plot does not allow afterward adjustment with size
currently (by using setp).
Probably you should redraw the scatter points with different sizes. like
for x,y,z in zip(xlist,ylist,sizelist):
m.scatter(x,y,s=z)
if you question is to change the real 2km or 1.5km to the s
https://github.com/ChaoYue/pylsce/blob/master/g.py
Calc_Newaxes_Fraction
Axes_Replace_Split_Axes
Axes_Set_Breakaxis
a working example is below:
>>> fig,axs = plt.subplots(nrows=2)
>>> bottom_ax, top_ax =
g.Axes_Replace_Split_Axes(fig,axs[0],split_fraction=[0.36
when saving as jpg, I cannot reproduce the problem.
I am using version 1.2
Chao
On Wed, Mar 27, 2013 at 10:16 PM, Steven Boada [via matplotlib] <
ml-node+s1069221n40764...@n5.nabble.com> wrote:
> Hey List,
>
> If you create a horizontal line, and then adjust the size of the figure,
> or axis lim
Agree with Eric. I guess if you remove sharex=True, it will work.
Chao
On Wed, Mar 20, 2013 at 10:27 PM, Eric Firing [via matplotlib] <
ml-node+s1069221n40690...@n5.nabble.com> wrote:
> On 2013/03/20 8:57 AM, Jonathan Slavin wrote:
>
> > Hi all,
> >
> > I've run across a minor but annoying bug.
it also works for me for 1.2.0
In [1]: mat.__version__
Out[1]: '1.2.0'
In [2]: plot(np.arange(5),'ro')
Out[2]: []
In [3]: ax = gca()
In [4]: ax.set_xticklabels('abcdefghij')
Out[4]:
[,
,
,
,
,
,
,
,
]
In [5]: [t.get_text() for t in ax.get_xticklabels()]
Out[5]: ['a', 'b', 'c', 'd', 'e'
Hi,
could you use a loop to solve it?
arr1list = [np.arange(10) + i for i in range(10)]
arr2list = [np.arange(10) -i for i in range(10)]
for arr1,arr2 in zip(arr1list,arr2list):
plot(arr1,arr2)
you can use a more object oriented way:
fig = plt.figure()
ax = fig.add_subplot()
for arr1,arr2
could you try
l = ax.legend((p1,p2),['points','point_2'],scatterpoints=2)
I think length-1 list label make the second point omitted.
Chao
--
View this message in context:
http://matplotlib.1069221.n5.nabble.com/append-to-or-concatenate-PathCollection-objects-tp40302p40309.html
Sent from th
I doubt there is a color called 'face', according to documentation:
In [2]: setp(mat.collections.PathCollection,'edgecolor')
edgecolor: matplotlib color arg or sequence of rgba tuples
probably because matplotlib doesn't know how rend the color 'face'?
Chao
--
View this message in cont
Hi,
rather than the previous manual definition of the text postioins, I find a
more general/decent way:
yloc=(cbar.values-cbar.boundaries[0])/(cbar.boundaries[-1]-cbar.boundaries[0])
for l,y in zip(cbar_label,yloc):
cbar.ax.text(1,y,l,transform=cbar.ax.transAxes,ha='left',va='center')
Chao
I have a bit progress, but still not very well.
#to have a contourf plot
a = np.arange(100).reshape(10,10)
cbarlevel=np.arange(0,101,10)
contourf(a,levels=cbarlevel)
cbar = colorbar()
cbar.set_ticks(cbarlevel)
#to manipulate the range:
cbar_label = []
for i in range(len(cbarlevel)-1):
cbar_la
Hi, I once was indicated a way to extract colors from exsiting colormaps:
I just answered a question on Stackoverflow and maybe you can have a look.
all code in pylab mode
a = np.arange(100).reshape(10,10)
#here is the image with white and black end
imshow(a,cmap=mat.cm.binary)
colorbar()
#we e
36 matches
Mail list logo