Message Boards Message Boards

0
|
26897 Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

"Could not combine the graphics objects in Show[..." error message

Posted 11 years ago
Attachments:
POSTED BY: Gary White
3 Replies
Posted 11 years ago

Sorry for the delay in replying and thanks for the answers. I went camping shortly after I posted this and was completely off the grid.

This is a real forehead slapper; I don't know how I missed this. I thought that I was using autocomplete in order to avoid this kind of problem but obviously I missed this one.

POSTED BY: Gary White
Posted 11 years ago

@Gary, there are clues in the error messages that might lead one to the conclusion that scatterPlot is defective. Mouseover of the output error message gives the statement "Skeleton is not a Graphics primitive or directive", suggesting that one of the variables given to Show, possibly scatterPlot, is lacking something. Your last line Show[scatterPlot] gives it's own names as output, showing again that scatterPlot is an empty object. You could write a new line with only scatterPlot and the output would be scatterPlot when it should be a graphics object.

POSTED BY: Gary Palmer

Hi Gary,

that is because you have defined "scatterplot" but you want to show "scatterPlot". For Mathematica that are two different things, because Mathematica is case sensitive. If you use

Show[scatterplot, 
 Plot[{fitLine, fitQuadratic}, {x, 0, 30}, Filling -> True]]

and

Show[scatterplot] 

It will work.

Cheers,

Marco

POSTED BY: Marco Thiel
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