
Hi, I'm creating a slice image but it's refusing to tick mark my colour bar properly: http://i.imgur.com/YQBWJ.png pc = PlotCollection(pf, center=position) p = pc.add_slice("NegEscapeVelocity", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "disk_radius":profile["DiskRadius"], "disk_potential":profile["PotentialField"]}) p.set_log_field(False) p.set_zlim(0.0, 30.0) p.set_width(8, 'kpc') Is there something simple I've done wrong? I tried rearranging the last 3 lines, but to no avail! Elizabeth

Hi Elizabeth, Huh, looks like the ticks are *there*, just not being labeled. Do you by any chance have something in your ~/.matplotlib/matplotlibrc that could be interfering? -Matt On Wed, May 2, 2012 at 6:32 AM, Elizabeth Tasker <tasker@astro1.sci.hokudai.ac.jp> wrote:
Hi,
I'm creating a slice image but it's refusing to tick mark my colour bar properly:
pc = PlotCollection(pf, center=position) p = pc.add_slice("NegEscapeVelocity", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "disk_radius":profile["DiskRadius"], "disk_potential":profile["PotentialField"]}) p.set_log_field(False) p.set_zlim(0.0, 30.0) p.set_width(8, 'kpc')
Is there something simple I've done wrong? I tried rearranging the last 3 lines, but to no avail!
Elizabeth _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Not... intentionally. But I'll try deleting the directory and get yt to recreate it. Elizabeth On 2012-05-02, at 9:24 PM, Matthew Turk wrote:
Hi Elizabeth,
Huh, looks like the ticks are *there*, just not being labeled. Do you by any chance have something in your ~/.matplotlib/matplotlibrc that could be interfering?
-Matt
On Wed, May 2, 2012 at 6:32 AM, Elizabeth Tasker <tasker@astro1.sci.hokudai.ac.jp> wrote:
Hi,
I'm creating a slice image but it's refusing to tick mark my colour bar properly:
pc = PlotCollection(pf, center=position) p = pc.add_slice("NegEscapeVelocity", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "disk_radius":profile["DiskRadius"], "disk_potential":profile["PotentialField"]}) p.set_log_field(False) p.set_zlim(0.0, 30.0) p.set_width(8, 'kpc')
Is there something simple I've done wrong? I tried rearranging the last 3 lines, but to no avail!
Elizabeth _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi Elizabeth, Well, maybe that's not such a good idea -- it belongs to matplotlib, and you'd definitely know if you've modified something. In retrospect, what might be happening is that it is inserting minor ticks at 1e1 values and major at 1e2. What happens if you bump the top of zlim up to 110? That should get a "major" tick in there and leave the minor. If that fixes it, I can dig in and see what's going on, but generating lookalike data might take a bit. -Matt On Wed, May 2, 2012 at 8:50 AM, Elizabeth Tasker <tasker@astro1.sci.hokudai.ac.jp> wrote:
Not... intentionally. But I'll try deleting the directory and get yt to recreate it.
Elizabeth
On 2012-05-02, at 9:24 PM, Matthew Turk wrote:
Hi Elizabeth,
Huh, looks like the ticks are *there*, just not being labeled. Do you by any chance have something in your ~/.matplotlib/matplotlibrc that could be interfering?
-Matt
On Wed, May 2, 2012 at 6:32 AM, Elizabeth Tasker <tasker@astro1.sci.hokudai.ac.jp> wrote:
Hi,
I'm creating a slice image but it's refusing to tick mark my colour bar properly:
pc = PlotCollection(pf, center=position) p = pc.add_slice("NegEscapeVelocity", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "disk_radius":profile["DiskRadius"], "disk_potential":profile["PotentialField"]}) p.set_log_field(False) p.set_zlim(0.0, 30.0) p.set_width(8, 'kpc')
Is there something simple I've done wrong? I tried rearranging the last 3 lines, but to no avail!
Elizabeth _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Looks like you have less than one order magnitude on a log scale. Matplotlib often doesn't tick in this situation. I believe you can set an option to label the minor ticks, but I don't know how off the top of my head. J On May 2, 2012 3:32 AM, "Elizabeth Tasker" <tasker@astro1.sci.hokudai.ac.jp> wrote:
Hi,
I'm creating a slice image but it's refusing to tick mark my colour bar properly:
pc = PlotCollection(pf, center=position) p = pc.add_slice("NegEscapeVelocity", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "disk_radius":profile["DiskRadius"], "disk_potential":profile["PotentialField"]}) p.set_log_field(False) p.set_zlim(0.0, 30.0) p.set_width(8, 'kpc')
Is there something simple I've done wrong? I tried rearranging the last 3 lines, but to no avail!
Elizabeth _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Oh, I just read the script. Never mind. Sorry for the noise. On May 2, 2012 7:39 AM, "j s oishi" <jsoishi@gmail.com> wrote:
Looks like you have less than one order magnitude on a log scale. Matplotlib often doesn't tick in this situation. I believe you can set an option to label the minor ticks, but I don't know how off the top of my head.
J On May 2, 2012 3:32 AM, "Elizabeth Tasker" < tasker@astro1.sci.hokudai.ac.jp> wrote:
Hi,
I'm creating a slice image but it's refusing to tick mark my colour bar properly:
pc = PlotCollection(pf, center=position) p = pc.add_slice("NegEscapeVelocity", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "disk_radius":profile["DiskRadius"], "disk_potential":profile["PotentialField"]}) p.set_log_field(False) p.set_zlim(0.0, 30.0) p.set_width(8, 'kpc')
Is there something simple I've done wrong? I tried rearranging the last 3 lines, but to no avail!
Elizabeth _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi Elizabeth, You may want to try the keyword minmaxtick, as in pc.set_zlim(0.0,30.0,minmaxtick=True). This should put ticks at the top and bottom. I'm not sure why they aren't showing up, but maybe this will force it along. You may also try setting nticks=N. Sam On Wed, May 2, 2012 at 8:39 AM, j s oishi <jsoishi@gmail.com> wrote:
Looks like you have less than one order magnitude on a log scale. Matplotlib often doesn't tick in this situation. I believe you can set an option to label the minor ticks, but I don't know how off the top of my head.
J On May 2, 2012 3:32 AM, "Elizabeth Tasker" < tasker@astro1.sci.hokudai.ac.jp> wrote:
Hi,
I'm creating a slice image but it's refusing to tick mark my colour bar properly:
pc = PlotCollection(pf, center=position) p = pc.add_slice("NegEscapeVelocity", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "disk_radius":profile["DiskRadius"], "disk_potential":profile["PotentialField"]}) p.set_log_field(False) p.set_zlim(0.0, 30.0) p.set_width(8, 'kpc')
Is there something simple I've done wrong? I tried rearranging the last 3 lines, but to no avail!
Elizabeth _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Samuel W. Skillman DOE Computational Science Graduate Fellow Center for Astrophysics and Space Astronomy University of Colorado at Boulder samuel.skillman[at]colorado.edu

Hi Sam, Most delayed response ever but yes! That fixed the problem. Thank you! That is now so much easier to read…. :) Elizabeth On May 2, 2012, at 11:47 PM, Samuel W Skillman wrote:
Hi Elizabeth,
You may want to try the keyword minmaxtick, as in
pc.set_zlim(0.0,30.0,minmaxtick=True).
This should put ticks at the top and bottom. I'm not sure why they aren't showing up, but maybe this will force it along. You may also try setting nticks=N.
Sam
On Wed, May 2, 2012 at 8:39 AM, j s oishi <jsoishi@gmail.com> wrote: Looks like you have less than one order magnitude on a log scale. Matplotlib often doesn't tick in this situation. I believe you can set an option to label the minor ticks, but I don't know how off the top of my head.
J
On May 2, 2012 3:32 AM, "Elizabeth Tasker" <tasker@astro1.sci.hokudai.ac.jp> wrote: Hi,
I'm creating a slice image but it's refusing to tick mark my colour bar properly:
pc = PlotCollection(pf, center=position) p = pc.add_slice("NegEscapeVelocity", 2, field_parameters={"disk_vector":disk_vector, "disk_center":disk_center, "disk_radius":profile["DiskRadius"], "disk_potential":profile["PotentialField"]}) p.set_log_field(False) p.set_zlim(0.0, 30.0) p.set_width(8, 'kpc')
Is there something simple I've done wrong? I tried rearranging the last 3 lines, but to no avail!
Elizabeth _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Samuel W. Skillman DOE Computational Science Graduate Fellow Center for Astrophysics and Space Astronomy University of Colorado at Boulder samuel.skillman[at]colorado.edu _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (4)
-
Elizabeth Tasker
-
j s oishi
-
Matthew Turk
-
Samuel W Skillman