Thank you very much Jason,
your help is highly appreciated! It seems that the interaction with
matplotlib is a bit more complicated than what I imagined. :-)

I tried your code and it worked fine, but the xmin, xmax ... has been
ignored. After experimenting I found the place, where I have to put
these
parameters.

Here is the code:

P = [1/6,1/6,1/6,1/6,1/6,1/6]
X = [1,2,3,4,5,6]
discrDistr = [(X[_],P[_]) for _ in range(len(P))]  # Prepare values
for scatter_plot
p1 = scatter_plot(discrDistr, markersize=100,facecolor='blue')
counter = 0
for expr in P:
     p1 += line([(X[counter],0),
(X[counter],expr)],linestyle="--",color='black',thickness=2)
     counter = counter + 1
p1.axes_width(2)

m=p1.matplotlib(fontsize=20,xmin=0,xmax=(len(P)+0.5),ymax=0.3 )

from matplotlib import pyplot
xticks = pyplot.getp(m.axes[0], 'xticklines')          #get tick
parameters
yticks = pyplot.getp(m.axes[0], 'yticklines')
pyplot.setp(xticks, markeredgewidth=2, markersize=10)  #set tick
parameters
pyplot.setp(yticks, markeredgewidth=2, markersize=10)

from matplotlib.backends.backend_agg import FigureCanvasAgg
m.set_canvas(FigureCanvasAgg(m))
m.savefig('test.png')


Thanks again!
Goebbe

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to