Struggle with ticker.SymmetricalLogLocator()

Hi,

I want to make a symmetric logarithmic plot, but unfortunately the y-values
are overlapping around 0. I don't want to display the first values around 0.
I'm not sure how to use the ticker.SymmetricalLogLocator command to change
the ticklocations or the tickfrequencies. I searched for a long time but
didn't find any proper solution for it besides the examples for the normal
Loglocater which didn't work. I tried to understand how the
ticker.SymmetricalLogLocator(transform, subs=None) instance is working on
the matplotlib documentation side which is not an easy target for me. I only
want that the first ticklabes around zero are not displayed in my plot.

I'm using the plt.yscale('symlog') command in order to plot it symmetrically
around zero. My picture looks like

<http://matplotlib.1069221.n5.nabble.com/file/n46753/heat1_raten1.png>
Sorry for my bad English,
thanx for any help in advance

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Struggle-with-ticker-SymmetricalLogLocator-tp46753.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

I'm sorry for the long delay, but in case you haven't found a solution
yet, here is an example of one way of handling the situation:

import matplotlib.pyplot as plt
import numpy as np

dt = 0.01
x = np.arange(-50.0, 50.0, dt)
y = np.arange(0, 100.0, dt)

fig, ax = plt.subplots()
ax.plot(y, x)
ax.set_yscale('symlog')
ax.set_ylabel('symlogy')

ylabs = ax.yaxis.get_ticklabels()
i0 = int(len(ylabs) // 2)

for label in ylabs[i0-1:i0+2]:
     label.set_visible(False)

plt.show()

···

On 2016/02/15 12:03 AM, superchinchilla wrote:

Hi,

I want to make a symmetric logarithmic plot, but unfortunately the y-values
are overlapping around 0. I don't want to display the first values around 0.
I'm not sure how to use the ticker.SymmetricalLogLocator command to change
the ticklocations or the tickfrequencies. I searched for a long time but
didn't find any proper solution for it besides the examples for the normal
Loglocater which didn't work. I tried to understand how the
ticker.SymmetricalLogLocator(transform, subs=None) instance is working on
the matplotlib documentation side which is not an easy target for me. I only
want that the first ticklabes around zero are not displayed in my plot.

I'm using the plt.yscale('symlog') command in order to plot it symmetrically
around zero. My picture looks like

<http://matplotlib.1069221.n5.nabble.com/file/n46753/heat1_raten1.png&gt;
Sorry for my bad English,
thanx for any help in advance

-----
Eric

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Struggle-with-ticker-SymmetricalLogLocator-tp46753.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
Matplotlib-users Info Page

Thanks for the answer,

I'm actually struggling to set a new major yticks in the case
symlog plot because it's not clear for me how the
  m=matplotlib.ticker.SymmetricallLogLocator(transform,subs=None)
  m.set_params() ... to change ytickfrequency and I didn't find a proper
  solution to it the internet?
  Do you know how to change it? What is the meaning of transform?

  Thank you very much,:slight_smile:
  chinchi

···

////||

Am 19.03.2016 um 01:13 schrieb Eric Firing [via matplotlib]:

On 2016/02/15 12:03 AM, superchinchilla wrote:

> Hi,
>
> I want to make a symmetric logarithmic plot, but unfortunately the
y-values
> are overlapping around 0. I don't want to display the first values
around 0.
> I'm not sure how to use the ticker.SymmetricalLogLocator command to
change
> the ticklocations or the tickfrequencies. I searched for a long time
but
> didn't find any proper solution for it besides the examples for the
normal
> Loglocater which didn't work. I tried to understand how the
> ticker.SymmetricalLogLocator(transform, subs=None) instance is
working on
> the matplotlib documentation side which is not an easy target for
me. I only
> want that the first ticklabes around zero are not displayed in my plot.
>
> I'm using the plt.yscale('symlog') command in order to plot it
symmetrically
> around zero. My picture looks like
>
> <http://matplotlib.1069221.n5.nabble.com/file/n46753/heat1_raten1.png&gt;
> Sorry for my bad English,
> thanx for any help in advance

I'm sorry for the long delay, but in case you haven't found a solution
yet, here is an example of one way of handling the situation:

import matplotlib.pyplot as plt
import numpy as np

dt = 0.01
x = np.arange(-50.0, 50.0, dt)
y = np.arange(0, 100.0, dt)

fig, ax = plt.subplots()
ax.plot(y, x)
ax.set_yscale('symlog')
ax.set_ylabel('symlogy')

ylabs = ax.yaxis.get_ticklabels()
i0 = int(len(ylabs) // 2)

for label in ylabs[i0-1:i0+2]:
     label.set_visible(False)

plt.show()

-----
Eric

>
>
>
> --
> View this message in context:
http://matplotlib.1069221.n5.nabble.com/Struggle-with-ticker-SymmetricalLogLocator-tp46753.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email]
> Matplotlib-users Info Page
>

_______________________________________________
Matplotlib-users mailing list
[hidden email]
Matplotlib-users Info Page

------------------------------------------------------------------------
If you reply to this email, your message will be added to the
discussion below:
http://matplotlib.1069221.n5.nabble.com/Struggle-with-ticker-SymmetricalLogLocator-tp46753p46905.html

To unsubscribe from Struggle with ticker.SymmetricalLogLocator(),
click here
<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=46753&code=Y2hpbmNoaUBwaHlzaWsudHUtYmVybGluLmRlfDQ2NzUzfC0yMTA2ODM5NDE3&gt;\.
NAML
<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html!nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers!nabble%3Aemail.naml-instant_emails!nabble%3Aemail.naml-send_instant_email!nabble%3Aemail.naml&gt;

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Struggle-with-ticker-SymmetricalLogLocator-tp46753p46907.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160319/e4813998/attachment.html&gt;