# How to plot a function for three variables in 2D plot?

I have a function and want to re-draw its plot for its three variables. Here is my function: Where X is: The plot of this function is: I'm thinking to draw a beautiful plot something like this: Plots in 2D

But couldn't find any idea to draw it. Is it possible to draw such a plot using Mathematica? How?

Edit1:

Forgot to say if it needed you can assume k=1.4 and M1=2

Edit2:

The code I've tried.

In:= k = 1.4

Out= 1.4

In:= m = 2

Out= 2

In:= X = (Tan[b - thet])/(Tan [b])

Out= Cot[b] Tan[b - thet]

In:= Q = -((k + 1)/2)*X^2*m^2 + (1 + k*m^2) X - (1 + ((k - 1)/2)*m)

Out= -1.4 + 6.6 Cot[b] Tan[b - thet] - 4.8 Cot[b]^2 Tan[b - thet]^2

In:= ContourPlot[Q, {thet, 0, 50}, {b, 0, 90}]

• You showed us a picture instead of a function. Give the code for the function you want to display in 2D. – Alex Trounev Sep 30 '19 at 16:50
• – user64494 Sep 30 '19 at 16:57
• @AlexTrounev Please check out Edit2. Thank you. – Roh Sep 30 '19 at 17:08

Clear["Global*"]

k = 7/5;
m = 2;
X = Tan[b - thet]/Tan[b];
Q = -((k + 1)/2)*X^2*m^2 + (1 + k*m^2) X - (1 + ((k - 1)/2)*m) // FullSimplify

(* 1/5 (-7 + 3 Cot[b] Tan[b - thet] (11 - 8 Cot[b] Tan[b - thet])) *)


Your plot has too much structure to be seen at the PlotRange you used.

ContourPlot[Q, {thet, 0, 5}, {b, 0, 9}, PlotPoints -> 50] See example below (omitting eq 19 and 20 from your sample)

q[\[Beta]_, \[Theta]_] := Module[{x = Tan[\[Beta] - \[Theta]]/Tan[\[Beta]]}, 1 - x^2 - 3 x]

ContourPlot[q[\[Beta], \[Theta]], {\[Beta], 0, 1}, {\[Theta], 0, 1}, ContourShading -> None]
` 