Andiguys

100 Reputation

5 Badges

1 years, 271 days

MaplePrimes Activity


These are questions asked by Andiguys

In the plot shown below, one of the axes is not visible, and one of the lines inside the graph is also missing. Is there an error in the plotting syntax that is causing this issue? Could anyone please identify the mistake and suggest how to correct it

All_plots_Question.mw

Suppose I am plotting a 2D plot and want to highlight the point where two lines intersect. I would like to display this intersection point inside the plot in black font, mark it with an arrow or some visual highlight, and clearly label it. How can I do this?

Additionally, instead of using different colours (blue, green, red) for the lines, I want to distinguish them using different line styles such as solid, dotted, and long-dashed lines. How can I make these changes?

restart

with(Optimization); with(plots); with(Student[VectorCalculus]); with(LinearAlgebra)

 

_local(Pi)

Pi

(1)
 

M_w := b*(((Cr*alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+((g*i2-a)*Cr-2*Crm-2*c+2*Pr)*alpha-(-g*i2+a)*Cr)*d+alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+2*g*i2-2*a)*rho0+(2*((Cr*b-1)*d+b))*(delta+Cn-Pr-1))^2*d/(8*(Cr*b*d+b-d)^2*(((Cr*alpha*b-alpha+1)*d+alpha*b)*rho0^2-2*b*d*(delta-1)))

(1/8)*b*(((Cr*alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+((g*i2-a)*Cr-2*Crm-2*c+2*Pr)*alpha-(-g*i2+a)*Cr)*d+alpha*((-g*i2+a)*Cr+2*Crm+2*c-2*Pr)*b+2*g*i2-2*a)*rho0+(2*(Cr*b-1)*d+2*b)*(delta+Cn-Pr-1))^2*d/((Cr*b*d+b-d)^2*(((Cr*alpha*b-alpha+1)*d+alpha*b)*rho0^2-2*b*d*(delta-1)))

(2)
 

 

M_D := (Cr*rho0*t*(Cr*alpha*b-alpha-1)*d^2+((alpha*((-g*i2+a)*Cr+2*Crm+2*c+3*t-2*Pr)*Cr*b+((g*i2-a)*Cr-2*Crm-2*c-2*t+2*Pr)*alpha+(g*i2-a)*Cr-2*t)*rho0+(2*(Cr*b-1))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)*alpha*b+2*g*i2-2*a)*rho0-(-2*sigma*t-2*Cn+2*Pr-2*delta+2)*((Cr*b-1)*d+b))^2*b*d/((8*((Cr*alpha*b-alpha+1)*d+alpha*b)*rho0^2-16*b*d*(delta-1))*(Cr*b*d+b-d)^2)

(4)
 

``

DATA1 := [delta = .9, a = 0.1e-1, g = .25, c = 0.5e-1, rho0 = .4, Cn = .4, Crm = .1, i2 = 0.6e-1, t = 0.1e-1, alpha = .95, s = 0.1e-1, Pr = .35, upsilon = .95, b = .5, d = .3, Cr = 0.1e-1]

[delta = .9, a = 0.1e-1, g = .25, c = 0.5e-1, rho0 = .4, Cn = .4, Crm = .1, i2 = 0.6e-1, t = 0.1e-1, alpha = .95, s = 0.1e-1, Pr = .35, upsilon = .95, b = .5, d = .3, Cr = 0.1e-1]

(5)

P11 := subs(DATA1, M_w); P21 := subs(DATA1, M_D); P31 := subs(DATA1, M_S)

0.9301486586e-2

 

4.251178959*(-0.4764573140e-1+0.4030e-2*sigma)^2

 

4.251178959*(-0.4917713136e-1+0.4030e-2*sigma)^2

(6)

``

A1 := plot([P11, P21, P31], sigma = 0 .. .7, color = ["Red", "Blue", "Green"], labels = [sigma, `π__m`], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("π"),mi("n"),mn("W"));`, `#msubsup(mi("π"),mi("n"),mn("D"));`, `#msubsup(mi("π"),mi("n"),mn("DS"));`], axis[2] = [color = "#600000"])

 
 

display(A1, pointplot([[X, Y]], symbol = circle, symbolsize = 25, color = blue))

Error, (in plots:-pointplot) points cannot be converted to floating-point values

 
 

NULL

Download Manf_profit__t_graph_changes_needed.mw

I am facing three issues while plotting my plot.I need help modifying the syntax:

  1. I am unable to correctly display superscripts and subscripts for Pi[m]^WD < Pi[m]^D inside the graph region

  2. I cannot format the subscript for i__2 on the x-axis.

  3. A horizontal dotted line appears parallel to the x-axis at y=0.5; how can I remove this line?

    Question_1_regional.mw

Syntax for merging and overlaying all three graphs on a single plot.
Include three sets of iso-profit lines on the same axes:
– Case 1: thin solid lines
– case 2: brown dashed lines
– Case 3: grey semi-dashed lines
Also add vector arrows to show the direction of maximum profit increase.
Combined plot = Plot 1 + Plot 2 +  Plot 3
Attaching sheet:
case_1.mw                  case_2.mw                 Case_3.mw
 

sample graph: 

In the current graph, the three curves appear close together and are hard to distinguish because of a scaling issue. How can we adjust the scale so that each line is clearly visible and separate?

restart

L1 := ((3.26592*rho0^2-0.9411e-1*rho0+.3000)/(3.6288*rho0^2+.48)-.35)*(3.000000000-(3.333333333*(3.26592*rho0^2-0.9411e-1*rho0+.3000))/(3.6288*rho0^2+.48))+(.9*(.5+(.6250000000*(-.5126688*rho0^2-.887040*rho0+0.1584e-1))/(1.8144*rho0^2+.24)))*(0.163690476e-1-(.2480158730*(-.5126688*rho0^2-.887040*rho0+0.1584e-1))/(1.8144*rho0^2+.24))+.1408958333+(0.2430555555e-1*(-.5126688*rho0^2-.887040*rho0+0.1584e-1))/(1.8144*rho0^2+.24)+(-(.3149801588*(-.5126688*rho0^2-.887040*rho0+0.1584e-1))/(1.8144*rho0^2+.24)+0.207886905e-1)*(0.163690476e-1-(.2480158730*(-.5126688*rho0^2-.887040*rho0+0.1584e-1))/(1.8144*rho0^2+.24))-0.1000000000e-1*(0.163690476e-1-(.2480158730*(-.5126688*rho0^2-.887040*rho0+0.1584e-1))/(1.8144*rho0^2+.24))^2+(1/2)*(3.000000000-(3.333333333*(3.26592*rho0^2-0.9411e-1*rho0+.3000))/(3.6288*rho0^2+.48))^2-(.1583333333*(3.26592*rho0^2-0.9411e-1*rho0+.3000))/(3.6288*rho0^2+.48)+(.6200396825*(-.339960-(.5000000000*(-.5126688*rho0^2-.887040*rho0+0.1584e-1))/(1.8144*rho0^2+.24)))*(0.163690476e-1-(.2480158730*(-.5126688*rho0^2-.887040*rho0+0.1584e-1))/(1.8144*rho0^2+.24)); L2 := ((3.14725824*rho0^2-.10491*rho0+.284952)/(3.6288*rho0^2+.48)-.32)*(2.891000000-(3.333333333*(3.14725824*rho0^2-.10491*rho0+.284952))/(3.6288*rho0^2+.48))+(.9*(.47+(.6250000000*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1))/(1.8144*rho0^2+.24)))*(0.282738095e-1-(.2480158730*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1))/(1.8144*rho0^2+.24))+.1345516666+(0.2430555555e-1*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1))/(1.8144*rho0^2+.24)+(-(.3149801588*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1))/(1.8144*rho0^2+.24)+0.359077381e-1)*(0.282738095e-1-(.2480158730*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1))/(1.8144*rho0^2+.24))-0.1000000000e-1*(0.282738095e-1-(.2480158730*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1))/(1.8144*rho0^2+.24))^2+(1/2)*(2.891000000-(3.333333333*(3.14725824*rho0^2-.10491*rho0+.284952))/(3.6288*rho0^2+.48))^2-(.1583333333*(3.14725824*rho0^2-.10491*rho0+.284952))/(3.6288*rho0^2+.48)+(.6200396825*(-.364344-(.5000000000*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1))/(1.8144*rho0^2+.24)))*(0.282738095e-1-(.2480158730*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1))/(1.8144*rho0^2+.24)); L3 := ((3.14725824*rho0^2-.105342*rho0+.284952)/(3.6288*rho0^2+.48)-.32)*(2.891000000-(3.333333333*(3.14725824*rho0^2-.105342*rho0+.284952))/(3.6288*rho0^2+.48))+(.9*(.47+(.6250000000*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1))/(1.8144*rho0^2+.24)))*(0.290674603e-1-(.2480158730*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1))/(1.8144*rho0^2+.24))+.1344738889+(0.2430555555e-1*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1))/(1.8144*rho0^2+.24)+(-(.3149801588*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1))/(1.8144*rho0^2+.24)+0.369156746e-1)*(0.290674603e-1-(.2480158730*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1))/(1.8144*rho0^2+.24))-0.1000000000e-1*(0.290674603e-1-(.2480158730*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1))/(1.8144*rho0^2+.24))^2+(1/2)*(2.891000000-(3.333333333*(3.14725824*rho0^2-.105342*rho0+.284952))/(3.6288*rho0^2+.48))^2+(-.1949156746-(.3100198412*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1))/(1.8144*rho0^2+.24))*(0.290674603e-1-(.2480158730*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1))/(1.8144*rho0^2+.24))-(.1583333333*(3.14725824*rho0^2-.105342*rho0+.284952))/(3.6288*rho0^2+.48)

((3.26592*rho0^2-0.9411e-1*rho0+.3000)/(3.6288*rho0^2+.48)-.35)*(3.000000000-3.333333333*(3.26592*rho0^2-0.9411e-1*rho0+.3000)/(3.6288*rho0^2+.48))+.9*(.5+.6250000000*(-.5126688*rho0^2-.887040*rho0+0.1584e-1)/(1.8144*rho0^2+.24))*(0.163690476e-1-.2480158730*(-.5126688*rho0^2-.887040*rho0+0.1584e-1)/(1.8144*rho0^2+.24))+.1408958333+0.2430555555e-1*(-.5126688*rho0^2-.887040*rho0+0.1584e-1)/(1.8144*rho0^2+.24)+(-.3149801588*(-.5126688*rho0^2-.887040*rho0+0.1584e-1)/(1.8144*rho0^2+.24)+0.207886905e-1)*(0.163690476e-1-.2480158730*(-.5126688*rho0^2-.887040*rho0+0.1584e-1)/(1.8144*rho0^2+.24))-0.1000000000e-1*(0.163690476e-1-.2480158730*(-.5126688*rho0^2-.887040*rho0+0.1584e-1)/(1.8144*rho0^2+.24))^2+(1/2)*(3.000000000-3.333333333*(3.26592*rho0^2-0.9411e-1*rho0+.3000)/(3.6288*rho0^2+.48))^2-.1583333333*(3.26592*rho0^2-0.9411e-1*rho0+.3000)/(3.6288*rho0^2+.48)+.6200396825*(-.339960-.5000000000*(-.5126688*rho0^2-.887040*rho0+0.1584e-1)/(1.8144*rho0^2+.24))*(0.163690476e-1-.2480158730*(-.5126688*rho0^2-.887040*rho0+0.1584e-1)/(1.8144*rho0^2+.24))

 

((3.14725824*rho0^2-.10491*rho0+.284952)/(3.6288*rho0^2+.48)-.32)*(2.891000000-3.333333333*(3.14725824*rho0^2-.10491*rho0+.284952)/(3.6288*rho0^2+.48))+.9*(.47+.6250000000*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1)/(1.8144*rho0^2+.24))*(0.282738095e-1-.2480158730*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1)/(1.8144*rho0^2+.24))+.1345516666+0.2430555555e-1*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1)/(1.8144*rho0^2+.24)+(-.3149801588*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1)/(1.8144*rho0^2+.24)+0.359077381e-1)*(0.282738095e-1-.2480158730*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1)/(1.8144*rho0^2+.24))-0.1000000000e-1*(0.282738095e-1-.2480158730*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1)/(1.8144*rho0^2+.24))^2+(1/2)*(2.891000000-3.333333333*(3.14725824*rho0^2-.10491*rho0+.284952)/(3.6288*rho0^2+.48))^2-.1583333333*(3.14725824*rho0^2-.10491*rho0+.284952)/(3.6288*rho0^2+.48)+.6200396825*(-.364344-.5000000000*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1)/(1.8144*rho0^2+.24))*(0.282738095e-1-.2480158730*(-.4981536*rho0^2-.88268544*rho0+0.2736e-1)/(1.8144*rho0^2+.24))

 

((3.14725824*rho0^2-.105342*rho0+.284952)/(3.6288*rho0^2+.48)-.32)*(2.891000000-3.333333333*(3.14725824*rho0^2-.105342*rho0+.284952)/(3.6288*rho0^2+.48))+.9*(.47+.6250000000*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1)/(1.8144*rho0^2+.24))*(0.290674603e-1-.2480158730*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1)/(1.8144*rho0^2+.24))+.1344738889+0.2430555555e-1*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1)/(1.8144*rho0^2+.24)+(-.3149801588*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1)/(1.8144*rho0^2+.24)+0.369156746e-1)*(0.290674603e-1-.2480158730*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1)/(1.8144*rho0^2+.24))-0.1000000000e-1*(0.290674603e-1-.2480158730*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1)/(1.8144*rho0^2+.24))^2+(1/2)*(2.891000000-3.333333333*(3.14725824*rho0^2-.105342*rho0+.284952)/(3.6288*rho0^2+.48))^2+(-.1949156746-.3100198412*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1)/(1.8144*rho0^2+.24))*(0.290674603e-1-.2480158730*(-.49525056*rho0^2-.88268544*rho0+0.28128e-1)/(1.8144*rho0^2+.24))-.1583333333*(3.14725824*rho0^2-.105342*rho0+.284952)/(3.6288*rho0^2+.48)

(1)

G2 := plot([L1, L2, L3], rho0 = 0 .. .8, color = ["#00FF00", "#00BC00", "#008000"], labels = [typeset(Typesetting:-mo("&rho;", mathvariant = "bold"), "\n"), typeset("\n", Typesetting:-mo("Retailer profit", mathvariant = "bold", mathcolor = "black"))], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("Pi"),mi("r"),mn("W"));`, `#msubsup(mi("Pi"),mi("r"),mn("D"));`, `#msubsup(mi("Pi"),mi("r"),mn("S"));`], axis[2] = [color = "#006000"])

 
 

``

Download Q_SEPERATE.mw

1 2 3 4 5 6 7 Last Page 2 of 12