dhonkabulo

25 Reputation

4 Badges

6 years, 267 days

MaplePrimes Activity


These are replies submitted by dhonkabulo

@Carl Love 

Without the procedure to save the plot, it did work fine and the plot showed on the screen,

But with the procedure the program kept evaluating for a long time without producing any plots and I had to stop Maple to quite the program.

Any way thank you very much for your suggestions.

@Carl Love 

Without the procedure to save the plot, it did work fine and the plot showed on the screen,

But with the procedure the program kept evaluating for a long time without producing any plots and I had to stop Maple to quite the program.

Any way thank you very much for your suggestions.

Hi again,

 

I tried with

A:= plot(sin(x), labels=[typeset(convert(a, `local`)[0]), "some text"]):

But the above procedure to save the plot did not work. The program did not produce any output.

 

Any help with this is appreciated.

Hi again,

 

I tried with

A:= plot(sin(x), labels=[typeset(convert(a, `local`)[0]), "some text"]):

But the above procedure to save the plot did not work. The program did not produce any output.

 

Any help with this is appreciated.

thank you for the suggestion. This worked well as it is.

However, it did not work with the following procedure to save the plot.  Any reason why it did not work? and is there any way I could use this procedure to save the plot. 

savePlotEPS:=proc(p, fileName, w:="750", h:="800")
     plotsetup('postscript', plotoutput=fileName, plotoptions=cat("quality=100,portrait,noborder,width=",w,",height=",h));
    print(p);
    Threads[Sleep](2);
    fclose(fileName);
    plotsetup(default):
end proc:
A:=plot(sin(x), labels=[typeset('a[0]'), "some text"], labeldirections=[default,vertical]):
myplot:= plots[display]([A],font=["Times","Roman",20],axes=boxed):
#===============================
savePlotEPS(myplot,"example.eps", 800, 800):
myplot;

thank you for the suggestion. This worked well as it is.

However, it did not work with the following procedure to save the plot.  Any reason why it did not work? and is there any way I could use this procedure to save the plot. 

savePlotEPS:=proc(p, fileName, w:="750", h:="800")
     plotsetup('postscript', plotoutput=fileName, plotoptions=cat("quality=100,portrait,noborder,width=",w,",height=",h));
    print(p);
    Threads[Sleep](2);
    fclose(fileName);
    plotsetup(default):
end proc:
A:=plot(sin(x), labels=[typeset('a[0]'), "some text"], labeldirections=[default,vertical]):
myplot:= plots[display]([A],font=["Times","Roman",20],axes=boxed):
#===============================
savePlotEPS(myplot,"example.eps", 800, 800):
myplot;

@Markiyan Hirnyk , @ Adri van der Meer @Carl Love

Thank you for your help.

Now I am able to get the eta's correctly on the caption.

But I still get PLOT(...)_0=1 for the text plot

Actually the display() has more other plots like the p, derived from a procedure

and I am using plotsetup() command to save the display. so putting restart at the begining of the code doesn't save the figure.

 

thanks

 

 

 

@Markiyan Hirnyk , @ Adri van der Meer @Carl Love

Thank you for your help.

Now I am able to get the eta's correctly on the caption.

But I still get PLOT(...)_0=1 for the text plot

Actually the display() has more other plots like the p, derived from a procedure

and I am using plotsetup() command to save the display. so putting restart at the begining of the code doesn't save the figure.

 

thanks

 

 

 

@Carl Love and @itsme

Thank you both for the example code.

This worked well for me.

just in case anyone reading this, this code will not work with the "restart" command. 

 

@Carl Love and @itsme

Thank you both for the example code.

This worked well for me.

just in case anyone reading this, this code will not work with the "restart" command. 

 

@Carl Love 

good question.

The matrix is to display in a document.

 

@Carl Love 

good question.

The matrix is to display in a document.

 

yes I have a column in the matrix in the form where

some rows for that column has the form:  [[a1,a2,b1,b2]];

some rows for that column has the form:  [[a1,a2,b1,b2], [c1,c2,d1,d2]];

some rows for that column has the form:  [[a1,a2,b1,b2], [c1,c2,d1,d2],[e1,e2,f1,f2]];

 

thanks

yes I have a column in the matrix in the form where

some rows for that column has the form:  [[a1,a2,b1,b2]];

some rows for that column has the form:  [[a1,a2,b1,b2], [c1,c2,d1,d2]];

some rows for that column has the form:  [[a1,a2,b1,b2], [c1,c2,d1,d2],[e1,e2,f1,f2]];

 

thanks

 

@Preben Alsholm 

Hi again. Finally I am able to produce a plot that I wanted to see (see figure below). however, I still want to make some improvements to it. I used the following code to produce it

A1:=plot([seq(Pts(beta)[1][i],i=1..4)],beta=1..1.9,color=[red,blue,green,gold],linestyle=solid,thickness=2):
A2:=plot([seq(Pts(beta)[2][i],i=1..4)],beta=1.9..4,color=[red,blue,green,gold],linestyle=longdash,thickness=2):

B1:=plot([seq(Pts(beta)[1][i],i=1..4)],beta=1.9..4,color=[red,blue,green,gold],style=point,symbol=circle):
B11:=plot([seq(Pts(beta)[1][i],i=1..4)],beta=1.6..4,color=[red,blue,green,gold], linestyle=solid,thickness=2):
plots:-display([A1,A2,B1,B11],labels=["X","Y"],font=["Times","Roman",18],labeldirections=[default,vertical],axis=[gridlines=10]);

From this image I wanned to distinguish the two equilibrium points (one with lines and one with circles and a line passing through them) and their stability (continuous part for stable, discontinuous part for unstable).

The figure looks okay on the Maple worksheet. But when I included this figure in a latex document the quality of the resulting figure is very poor. The circles (with a line passing through them) are so packed that the curve looks like a thick line.  Questions:

1) is there a way to improve the plot to make the circles more visible. I was thinking if the plot can produce circles with a greater space inbetween them, then it may help. But i don't know how to do this using plot().

PS: I do not want to remove the B11 plot.

2) Is there a better way to improve the resolution of the image. i used right-click export menu to save it as JPEG format.

Could anyone please help me to improve the plots.

thanks

 

1 2 Page 1 of 2