On 11 January 2012 15:13, Petro wrote:
> I want to make a plot with two xticks. Lets say at -3051 and 2011
> position. How can I do it?
One way to do it:
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-3100, 2025, num=50)
y = np.random.random(50)
plt.plot(x, y)
plt.xticks([
Hi all.
I want to make a plot with two xticks. Lets say at -3051 and 2011
position. How can I do it?
Thanks.
Petro.
--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT
On Tue, Nov 8, 2011 at 8:53 PM, Benjamin Root wrote:
> On Tuesday, November 8, 2011, Skipper Seabold wrote:
>> On Tue, Nov 8, 2011 at 6:13 PM, Benjamin Root wrote:
>>>
>>> On Tue, Nov 8, 2011 at 4:55 PM, Skipper Seabold
>>> wrote:
Hi,
Two related questions. Consider this plo
On Tuesday, November 8, 2011, Skipper Seabold wrote:
> On Tue, Nov 8, 2011 at 6:13 PM, Benjamin Root wrote:
>>
>> On Tue, Nov 8, 2011 at 4:55 PM, Skipper Seabold
wrote:
>>>
>>> Hi,
>>>
>>> Two related questions. Consider this plot
>>>
>>> -
>>>
>>> import matplotlib.pyplot as plt
>>> from mp
On Tue, Nov 8, 2011 at 6:13 PM, Benjamin Root wrote:
>
> On Tue, Nov 8, 2011 at 4:55 PM, Skipper Seabold wrote:
>>
>> Hi,
>>
>> Two related questions. Consider this plot
>>
>> -
>>
>> import matplotlib.pyplot as plt
>> from mpl_toolkits.mplot3d import Axes3D
>>
>> fig = plt.figure()
>> ax = f
On Tue, Nov 8, 2011 at 4:55 PM, Skipper Seabold wrote:
> Hi,
>
> Two related questions. Consider this plot
>
> -
>
> import matplotlib.pyplot as plt
> from mpl_toolkits.mplot3d import Axes3D
>
> fig = plt.figure()
> ax = fig.add_subplot(111, projection='3d')
> ax.plot([1,0,0,1],[0,1,0,0],[0,0
Hi,
Two related questions. Consider this plot
-
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot([1,0,0,1],[0,1,0,0],[0,0,1,0])
ax.set_xlim3d(0,1)
ax.set_ylim3d(0,1)
#ax.set_ylim3d(1,0)
ax.set_zlim
On 07/14/2011 08:08 PM, ruggit wrote:
> Hi,
>
> How to set the ticks width through rc?
> Something like: rc('xtick.major', size=6), but for the width? I cannot
> find the proper key.
There isn't one, and probably should be. You might want to file an
issue on github.
As a workaround, if you are
Hi,
How to set the ticks width through rc?
Something like: rc('xtick.major', size=6), but for the width? I cannot
find the proper key.
Thanks.
R.
--
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ri
>
> ax = plt.subplot(1,1,1)
> ticks = ax.xaxis.get_majorticklines()
> mytick = ticks[3]
> mytick.set_marker(2)
> plt.draw()
>
Cool! That's what I have been looking for. Thanks so much for your help.
Regards,
Bartek
-
On 11/02/2010 03:18 PM, Jae-Joon Lee wrote:
> A quick (and not safe) way w/ mpl v1.0 is,
>
> ax = plt.subplot(111)
> ax.plot(np.arange(3))
>
> ax.set_xticks([0, 0.5, 1., 1.5, 2.])
>
> mytick = ax.xaxis.majorTicks[2]
> mytick._apply_params(tickdir="out")
>
> I don't think th
A quick (and not safe) way w/ mpl v1.0 is,
ax = plt.subplot(111)
ax.plot(np.arange(3))
ax.set_xticks([0, 0.5, 1., 1.5, 2.])
mytick = ax.xaxis.majorTicks[2]
mytick._apply_params(tickdir="out")
I don't think there is a way to do this only using public apis.
I myself actually p
Hi all,
Is it possible to set direction (in or out) individually for each tick. I know
about the rc setting ("(x/y)tick.direction") , but I need a finer control over
the ticks.
Thanks,
Bartek
--
Nokia and AT&T present
Thanks all. That fixed the problem.
Ted
On 19 October 2010 00:02, Gökhan Sever wrote:
> On Mon, Oct 18, 2010 at 5:36 PM, Eric Firing wrote:
> >
> > setp(xticks, markeredgewidth=4)
> >
> > Ticks are markers.
> >
> > Eric
>
> Good catch. Thanks for the fix.
>
> --
> Gökhan
>
>
> ---
On Mon, Oct 18, 2010 at 5:36 PM, Eric Firing wrote:
>
> setp(xticks, markeredgewidth=4)
>
> Ticks are markers.
>
> Eric
Good catch. Thanks for the fix.
--
Gökhan
--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new
On 10/18/2010 09:42 AM, Gökhan Sever wrote:
> On Mon, Oct 18, 2010 at 12:46 PM, Ted Kord wrote:
>> Hi
>>
>> How do I make the tick size bigger as in thicker/bolder?
>>
>> matplotlib.rc('ytick.major', size=5) makes it longer but 'not' thicker.
>>
>> Ted
>
> I[1]: plt.plot(range(100))
> O[1]: []
>
>
On Mon, Oct 18, 2010 at 12:46 PM, Ted Kord wrote:
> Hi
>
> How do I make the tick size bigger as in thicker/bolder?
>
> matplotlib.rc('ytick.major', size=5) makes it longer but 'not' thicker.
>
> Ted
I[1]: plt.plot(range(100))
O[1]: []
I[2]: xticks = getp(gca(), 'xticklines')
I[3]: xgrids = get
Hi
How do I make the tick size bigger as in thicker/bolder?
matplotlib.rc('ytick.major', size=5) makes it longer but 'not' thicker.
Ted
--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash
On 04/20/2010 10:29 AM, Ryan May wrote:
> On Tue, Apr 20, 2010 at 8:58 AM, Nikolaus Rath wrote:
>> Hello,
>>
>> I'm trying to plot something from 0 to 2pi:
>>
>>fig = plt.figure()
>>ax = fig.add_subplot(111)
>>ax.set_title('Radial Magnetic Field')
>>ax.set_ylabel(r'Poloidal Angle $
On Tue, Apr 20, 2010 at 8:58 AM, Nikolaus Rath wrote:
> Hello,
>
> I'm trying to plot something from 0 to 2pi:
>
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.set_title('Radial Magnetic Field')
> ax.set_ylabel(r'Poloidal Angle $\theta$')
> ax.set_xlabel(r'Toroidal Angle $\ph
Hello,
I'm trying to plot something from 0 to 2pi:
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_title('Radial Magnetic Field')
ax.set_ylabel(r'Poloidal Angle $\theta$')
ax.set_xlabel(r'Toroidal Angle $\phi$')
ax.set_xticks([0, 2 * math.pi])
ax.set_xticklabels([
Well, to be clear.
How to get tick labels at the very end of the axes?
If the x-axis goes from is 0, 1 the axis ticks will be at 0.2,0.4,0.6 and
0.8 as you can here: see
http://matplotlib.sourceforge.net/examples/mplot3d/2dcollections3d_demo.html
How do I additionally get labels at 0 and 1?
Hope t
Thanks both of you. Works nicely.
I was also looking for line thickness, so:
for l in ax.get_xticklines() + ax.get_yticklines():
l.set_markersize(10)
l.set_markeredgewidth(10)
Has a slightly blurry edge at that size, but does the job.
Cheers,
Jon.
Matthias Michler wrote:
>
> Hi Jon
Hi Jon,
the dashed associated with each tick are actually line instances and therefore
hold information about the used marker, markersize, color, ...
For example you could do the following:
import matplotlib.pyplot as plt
ax = plt.gca() # get the current axes
for l in ax.get_xticklines() + ax
On Mon, Apr 27, 2009 at 12:15, D2Hitman wrote:
> I am looking to change the size/style of the tick markers. Not the labels
> associated with each tick, the dashes. How do i go about this?
There are several options in matplotlib config file (on Debian it's
/etc/matplotlibrc, but you can have also
I am looking to change the size/style of the tick markers. Not the labels
associated with each tick, the dashes. How do i go about this?
Cheers,
Jon.
--
View this message in context:
http://www.nabble.com/Ticks-tp23253405p23253405.html
Sent from the matplotlib - users mailing list archive at N
Thomas Robitaille wrote:
> Hi everyone,
>
> I am defining my own Locator class to determine where matplotlib
> should place the ticks on the x axis. I have managed do so, except
> for one problem. In order to determine the position of the ticks on
> the x-axis, I not only need the x axis ran
Hi everyone,
I am defining my own Locator class to determine where matplotlib
should place the ticks on the x axis. I have managed do so, except
for one problem. In order to determine the position of the ticks on
the x-axis, I not only need the x axis range, which I can retrieve
with self.
You cannot set different tick positions for bottom and top x-axis in
the same axes.
What you can do is to make another axes at the same location and use
it to draw ticks at top.
Take a look at
http://matplotlib.sourceforge.net/examples/api/two_scales.html
But it may not be an ideal solution for y
Hi,
I'm looking into customizing the the tick positions on an imshow plot. I
found that you can do this by doing
img = imshow(data)
img.ax.xaxis.set_ticks([100.,200.])
The problem with this method is that it moves the tick positions on the
bottom and top x axis. What if I wanted to do have th
Thanks John, that worked perfectly (with JJ's correction). I'm fairly
new to python and hadn't considered writing a separate class for it.
-Jeffrey
On Mon, Aug 11, 2008 at 3:53 PM, Jae-Joon Lee <[EMAIL PROTECTED]> wrote:
> A minor comment.
> John's code may give incorrect results when exponents
A minor comment.
John's code may give incorrect results when exponents are negative.
int() truncates a floating point argument towards zero, e.g.,
int(-1.5) == -1 not -2. I guess calling floor() before int() will
work.
fx = int(np.floor(np.log(abs(val))/np.log(self._base) +0.5))
-JJ
On
On Mon, Aug 11, 2008 at 1:45 PM, Jeffrey Fogel
<[EMAIL PROTECTED]> wrote:
> The two things I have been unable to figure out are how to add a major
> tick at all of the other magnitudes (those without a label) and how to
> change the format of the labels so that only the exponent is showing.
> I'm
I am having some trouble getting the ticks and labels on my plot to
match what I want and I was hoping that someone here would be able to
help. Here are what I want (on the yaxis):
logarithmic ticks with major ticks every order of magnitude but labels
ONLY every other magnitude. Additionally, I
Quoting Fabrice Silva:
> Using version 0.91.2, I do not manage to push ticks labels to
> the right side of the axis, keeping ticks lines on both
> sides. How can I do it ?
One solution is
yax = gca().yaxis
yax.set_ticks_position('right')
# labels right side; removes left ticks
Hi folks
Using version 0.91.2, I do not manage to push ticks labels to the right
side of the axis, keeping ticks lines on both sides. How can I do it ?
Another question :
I have two subplot "in-line" (121 and 122) sharing the same yaxis.
How would you set a single set of yticks labels displayed
Claudio <[EMAIL PROTECTED]> writes:
> Is there any way i can handle the size (without having to actually
> modify the whole system through config file)?
Yes, the size keyword:
> xticks(ind, colors.keys())
xticks(ind, colors.keys(), size='smaller')
The possible values of size are listed at
http
Hello.
I'm writing for a question about the bar() object. My problem is that I
have to write long labels to the ticks to indicate the bins' meaning but
they are overlapping one onto another. Is there any way i can handle the
size (without having to actually modify the whole system through config
fi
38 matches
Mail list logo