Ask Your Question
1

Tick Size in Plots

asked 2013-08-10 10:13:20 -0600

mrc gravatar image

Is it possible to increase the size of the tick marks on a plot made in sage? I would like to be able to insert plots into LaTeX documents using SageTeX's sageplot:

\begin{sagesilent}
f(x) = (x-2)*(x+3)
p = plot( f(x), (x, -4, 4), thickness = 10, fontsize = 42 )
\end{sagesilent}

sageplot[width = 0.33 \textwidth]{p}

Because the plot has been scaled down in TeX, the tick marks are hardly visible. Can I increase their size?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-08-10 17:12:12 -0600

ppurka gravatar image

According to this stackoverflow question, you can use rcParams to set the tick size and width.

edit flag offensive delete link more

Comments

I've got the method using rcParams to work, using matplotlib.rcParams['xtick.major.size'] = 10 to increase tick length. When I try to increase thickness using matplotlib.rcParams['xtick.major.width'] = 4, sage complains that "xtick.major.width is not a valid rc parameter". In matplotlib.rcParams.keys() in Python clearly lists this as a valid paramter, though . . . ?

mrc gravatar imagemrc ( 2013-08-14 04:56:42 -0600 )edit

Are you sure you didn't type it incorrectly in your sage prompt or sage cell? It works here sage: matplotlib.rcParams['xtick.major.width'] 0.5 sage: matplotlib.rcParams['xtick.major.width'] = 4 sage: matplotlib.rcParams['xtick.major.width'] 4.0

ppurka gravatar imageppurka ( 2013-08-14 06:02:42 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-08-10 10:13:20 -0600

Seen: 444 times

Last updated: Aug 10 '13