How to control the thickness of axes and tickmarks?

Hi, Colleagues,

I need strongly reduce Maple generated graphs for a journal publication. How could I make the axes and tickmarks thicker?

Thanks,

Evgeni

Comments

alec's picture

ps output

For publication, plots require a lot of additional work. The general idea is that one should use export to ps with editing of the eps file after that. It is better to avoid using any text in the plot. Also, ps export is better in earlier Maple versions.

Here is an example,

plotsetup(ps, plotoutput=`parabola.eps`, 
plotoptions=`width=4in,height=3in,noborder,portrait`);
plot(x->x^2,-1..1, thickness=5);

I used x->x^2 to avoid appearing of x in the plot. Now, the produced eps file can be opened in a text editor. To increase the width of axes and tickmarks, one can go to the lines /thin 3 def and /medium 7 def and change the numbers to the desirable width - something like /thin 15 def and /medium 18 def. After that, a lot of other editing is desirable - such as changing the position of 0 at the origin, changing 1 to 1.0 etc. - that also can be done in a text editor. Still, with a lot of manual work, it is rather hard to make the quality suitable for publishing. It is much easier to use MetaPost instead, or gnuplot, for example, or other CAS.

I thought there might exist a shorter way...

Thank you very much, Alec. I thought there might exist a shorter way...

Evgeni

alec's picture

A masochistic way

Also, it is possible to draw axes and tickmarks manually. For example,

xaxis:=proc(a,b,c) plottools[line]([a,0],[b,0],thickness=c) end:
yaxis:=proc(a,b,c) plottools[line]([0,a],[0,b],thickness=c) end:
xtick:=proc(a,b,c) plottools[line]([a,-b],[a,b],thickness=c) end:
ytick:=proc(a,b,c) plottools[line]([-b,a],[b,a],thickness=c) end:
f:=plot(x^2,x=-1.05..1.05,thickness=3):
plots[display](f,xaxis(-1.1,1.08,3),yaxis(0,1.04,3),
seq(xtick(-0.2*i,0.015,2),i=1..5),seq(xtick(0.2*i,0.015,2),i=1..5),
seq(ytick(0.1*i,0.02,2),i=1..10),
plots[textplot]([seq([0.2*i,-0.02,sprintf("%.1f",0.2*i)],i=-5..5)],
      align=BELOW,font=[TIMES,BOLD,14]),
plots[textplot]([seq([-0.03,0.1*i,sprintf("%.1f",0.1*i)],i=1..10)],
      align=LEFT,font=[TIMES,BOLD,14]),
plots[arrow]([1.08,0],[0.12,0],head_width=0.03,head_length=0.12,color=black),
plots[arrow]([0,1.04],[0,0.06],head_width=0.04,head_length=0.06,color=black),
plots[textplot]([1.25,0,"x"],align=RIGHT,font=[HELVETICA,14]),
plots[textplot]([0,1.14,"y"],align=ABOVE,font=[HELVETICA,14]),
axes=none,view=[-1.1..1.25,-0.1..1.2]);

Re: A masochistic way

Alec, that is precisely what I was doing before I asked gurus for help...

I think the Maple team should be improving the graphics tools.

Thank you very much,

Evgeni

Will's picture

GridLines

You might also want to take a look at this package that I wrote: Grid Lines in Maple.

It is a library that gives a new function GridDisplay which adds gridlines to any 2D plot. There are many options, some of which may be useful to you.

____
William Spaetzel
Applications Developer, Maplesoft

Re: GridLines

Thank you very much for the comment, Will. I looked at your code and I have not found how I could use it to control the thickness of axes and tickmarks. Have I missed something? If so, could not you give me an example, please?

Thanks again,

Evgeni

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}