Ask Your Question

antoniomg's profile - activity

2021-04-20 22:01:48 +0200 received badge  Famous Question (source)
2020-04-13 18:27:07 +0200 received badge  Notable Question (source)
2020-04-13 18:27:07 +0200 received badge  Popular Question (source)
2019-11-07 16:18:46 +0200 commented answer How to edit minor ticks in points() plot

(To the EDIT) Such a complete answer! You made my day, thanks a lot.

2019-11-07 09:41:03 +0200 received badge  Scholar (source)
2019-11-07 09:41:00 +0200 received badge  Supporter (source)
2019-11-07 09:40:51 +0200 commented answer How to edit minor ticks in points() plot

Oh, this is so useful. Such a simple solution, but so hard to find. Muchas gracias ^^ One last small follow-up question (if I should ask this separately, let me know): is there a way to hide the actual tick marks (if that's what they're called; I mean the little dashes crossing the axes) while keeping the grid?

This is my current code:

from matplotlib.ticker import NullFormatter

glsdict=dict(color='#AAABB8', linestyle='-')

points([CDF(a // 5 - 3 + (a % 5 - 2)*I) for a in range(0, 35)], ticks=[[-3..3], [-2..2]], tick_formatter=2*[NullFormatter()], gridlines=True, gridlinesstyle=glsdict, aspect_ratio=1)
2019-11-06 20:24:46 +0200 received badge  Student (source)
2019-11-06 20:16:53 +0200 asked a question How to edit minor ticks in points() plot

Hey there,

I am working with various plots in the complex plane, for instance:

points([CDF(a // 5 - 3 + (a % 5 - 2)*i) for a in range(0, 35)])

How would one go about deleting the minor ticks? This is a particular case of the more general question: how does one gain finer control over matplotlib parameter when working with sage plotting primitives? (especially grids, axes, ticks, etc.).

I have tried passing Locator and Formatter arguments to points, but as far as I can tell this affects both major and minor ticks. I have also tried working with matplotlib objects direcly via points(...).matplotlib(), where one can then fine-tune those elements. But I cannot actually get it to plot what I would expect after modifying them.

Please help! And thank you