Warning: Can't synchronize with the repository (Unsupported version control system "svn". Check that the Python support libraries for "svn" are correctly installed.)

Ticket #5 (closed defect: duplicate)

Opened 5 years ago

Last modified 4 years ago

patch to add rotate option to options.axis.x

Reported by: jae@… Owned by: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

Labels on the x axis can overlap if they are long enough. I've attached a small patch which adds a 'options.axis.x.rotate' option to deal with this situation by letting the user set a 'rotate' option as the number of degrees to rotate the labels (clockwise) thus avoiding the overlap.

This is the first time I've played with cairo, so this may not be the optimal way to do it. I rotate() to write the label and then rotate() back to the original orientation. I also tried it with get_matrix() and set_matrix(). I compared their performance (timeit) and there was no difference. I went with rotate as I thought it was more obvious what it was doing.

Attachments

rotate-x.patch (1.6 kB) - added by jae@… 5 years ago.
Patch to add rotate to options.axis.x

Change History

Changed 5 years ago by jae@…

Patch to add rotate to options.axis.x

Changed 5 years ago by jae@…

This patch is superseded by patch #6. Please disregard and use that one instead.

Changed 5 years ago by lgs

  • status changed from new to closed
  • resolution set to duplicate

Closing this ticket since it is a duplicate of #6, which is more complete.

Note: See TracTickets for help on using tickets.