Message Boards Message Boards

GROUPS:

Plot a function with x, y and a variable?

Posted 9 months ago
635 Views
|
1 Reply
|
1 Total Likes
|

I'm trying to plot a function with x, y and a variable. The code worked when I did a contour plot, but now I need a regular plot. Can somebody tell me what is wrong?

p1=Import["....xlsx"][[1]];
Stressfunc1 = LinearModelFit[p1, {1, x, y, x^2, x*y, y^2, x^3, x^2*y, x*y^2, y^3}, {x, y}];
Stressfunc1r = Stressfunc1["BestFit"]
Plot[Stressfunc1r, {x, 0, 1.4}, PlotLegends -> True, PlotLabel -> "A11 for Mesh 1", FrameLabel -> {"x", "y"}]

It is not clear what a regular plot is when you have a function of two variables. You may draw a single contour:

ContourPlot[Stressfunc1r, {x, 0, 1.4}, {y, 0, 1}, PlotLegends -> True,
  PlotLabel -> "A11 for Mesh 1", FrameLabel -> {"x", "y"}, 
 Contours -> {{.5}}, ContourShading -> None]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract