I have this two equations, and I want to solve them in a graphical way.
So, -I'm thinking- how can I plot them at the same time?
pt = {x, y} /. Solve[{2 x + y - 3 == 0, x + 3 y == 4}, {x, y}][[1]]
(* {1, 1} *)
Legended[
ContourPlot[
{2 x + y - 3 == 0, x + 3 y == 4},
{x, -1, 3}, {y, -1, 3},
FrameLabel -> (Style[#, 12, Bold] & /@ {x, y}),
Epilog -> {Red, AbsolutePointSize[4], Point[pt]}],
Placed[
LineLegend[
{ColorData[97][1], ColorData[97][2]},
{2 x + y - 3 == 0, x + 3 y == 4}], {.7, .7}]]
Plot[{3-2x, (4-x)/3},{x,0,1}]
? $\endgroup$PlotRange
can be used to set the range for both variables. $\endgroup$ContourPlot[{2 x + y - 3 == 0, x + 3 y == 4}, {x, -1, 3}, {y, -1, 3}, FrameLabel -> (Style[#, 12, Bold] & /@ {x, y}), MeshFunctions -> {Boole[2 # + #2 == 3 && (# + 3 #2 == 4)] &}, Mesh -> {{1}}, MeshStyle -> {Directive[Red, PointSize[Large]]}, PlotLegends -> Placed["Expressions", {.8, .9}]]
work in your version? $\endgroup$