Coder Social home page Coder Social logo

Axis labelling about latex HOT 6 CLOSED

spectralsequences avatar spectralsequences commented on June 11, 2024
Axis labelling

from latex.

Comments (6)

hoodmane avatar hoodmane commented on June 11, 2024

One way is to use the y tick handler key. The following seems to look pretty good. It doesn't seem to get the spacing of the labels correct by default so I put an extra \quad of spacing to the right.

\begin{sseqpage}[
  y tick handler = {
    \ifnum#1 = 0\relax
      0%
    \else
      \ifnum#1>1\relax#1\fi n - #1%
      % labels too close to axis by default 
      % so insert a bit of extra space
      \quad 
    \fi
  }
]
\class(0,0)
\class(4,4)
\end{sseqpage}

As another approach, the manual gives the following example:

\begin{sseqpage}[ no x ticks, x range = {0}{3} ]
\begin{scope}[ background ]
  \node at (0,\ymin - 1) {0};
  \node at (1,\ymin - 1) {n};
\foreach \n in {2,..., \xmax}{
  \node at (\n,\ymin - 1) {\n n};
}
\end{scope}
\class(0,0)
\class(3,2)
\end{sseqpage}

which could be adapted to your use case. This would probably be the way to go if the labels are particularly complicated.

from latex.

drewheard avatar drewheard commented on June 11, 2024

Thanks Hood! FYI, the manual at https://ctan.uib.no/graphics/pgf/contrib/spectralsequences/manual/spectralsequencesmanual.pdf is shorter than it should be, I believe (in particular, the example you gave doesn't appear)

from latex.

drewheard avatar drewheard commented on June 11, 2024

OK, the code

\begin{sseqpage}[no x ticks,no y ticks, classes = {draw = none},homological Serre grading]
\begin{scope}[ background ]
  \node at (0,-1) {0};
  \node at (3,-1) {n};
  \node at (-1,0) {0};
  \node at (-1,2) {n-1\quad};
  \node at (-1,4) {2n-2 \quad};
    \node at (-1,6) {3n-3\quad};
  \end{scope}
\class["\mathbb{Z}"](0,0)
\class["\mathbb{Z}"](3,0)
\class["H_{n-1}(\Omega S^n)"](0,2)
\class["H_{n-1}(\Omega S^n)"](3,2)
\class["H_{2n-2)}(\Omega S^n)"](0,4)
\class["H_{2n-2)}(\Omega S^n)"](3,4)
\class["H_{3n-3)}(\Omega S^n)"](0,6)
\class["H_{3n-3)}(\Omega S^n)"](3,6)
\d3(3,0)
\d3(3,2)
\d3(3,4)
\end{sseqpage}

works almost perfectly, except for the clipping. Any easy way to fix that?

from latex.

hoodmane avatar hoodmane commented on June 11, 2024

I think y axis gap=1.5cm, x axis extend end=1cm looks about right. You may also want right clip padding. The following diagram which should appear at the end of the manual explains the various parameters to adjust the chart display:
Screenshot from 2022-08-09 15-58-42

from latex.

drewheard avatar drewheard commented on June 11, 2024

Looks fantastic. Thanks again (and for the great package!)

from latex.

hoodmane avatar hoodmane commented on June 11, 2024

the manual is shorter than it should be

Thanks for pointing that out. I guess I should release a new version with the manual fixed...

from latex.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.