Plotting Mathematica - Why is this Happening?

In summary, there are a few reasons why your plot may not be showing up in Mathematica. First, make sure you have entered the necessary commands and have assigned the plot to a variable or used the Show command. To change the color or style of your plot, you can use the PlotStyle option or the ColorFunction option. You can also add a legend to your plot using the PlotLegends option and customize its appearance with the LineLegend or SwatchLegend functions. To add axes labels and a title to your plot, use the AxesLabel and PlotLabel options, or apply a pre-defined theme with the PlotTheme option. Finally, to export your plot as an image or PDF, use the Export function with the desired format and
  • #1
Dustinsfl
2,281
5
Why is this happening (see picture)?

View attachment 80
 
Physics news on Phys.org
  • #2
dwsmith said:
Why is this happening (see picture)?

View attachment 80

For starters, the call for Implicit plot should be

Code:
<< Graphics `ImplicitPlot`

Note that the "quotes" are angled differently (you should be using the key right next to 1 on the top of your keyboard; it gives ` instead of '). I would also recommend ending command lines with ; if you don't want them to individually appear once you execute them (i.e. it hides the output).

Also, ImplicitPlot is obsolete in Mathematica 8; the ContourPlot option does what ImplicitPlot used to do. Here's what I get now:

graph-1.png
 
Last edited:

FAQ: Plotting Mathematica - Why is this Happening?

Why is my plot not showing up in Mathematica?

There could be a few reasons for this. First, make sure that you have entered all the necessary commands to create the plot, such as Plot[...] or ListPlot[...]. Also, check that you have assigned the plot to a variable or used the Show[...] command to display it on the screen. Finally, check for any errors or typos in your code.

How do I change the color or style of my plot in Mathematica?

To change the color or style of your plot, you can use the PlotStyle option. For example, PlotStyle -> Red will change the color to red. You can also use other style options such as Dashed or Thick to change the appearance of the plot. Alternatively, you can use the ColorFunction option to specify a function that will determine the color of each point in the plot.

How do I add a legend to my plot in Mathematica?

To add a legend to your plot, you can use the PlotLegends option. This can be set to a list of labels, or you can use the LineLegend or SwatchLegend functions to customize the appearance of the legend. You can also use the LegendLabel option to add a title to your legend.

How can I add axes labels and a title to my plot in Mathematica?

To add axes labels, you can use the AxesLabel option. For example, AxesLabel -> {"x-axis", "y-axis"} will label the x and y axes accordingly. To add a title, you can use the PlotLabel option. Alternatively, you can use the PlotTheme option to apply a pre-defined theme to your plot, which includes axes labels and a title.

How can I export my plot as an image or a PDF file in Mathematica?

To export your plot as an image, you can use the Export function. For example, Export["myplot.png", plot] will save the plot as a PNG file. To export as a PDF, you can use the Export function with the "PDF" format specified. You can also use other formats such as "JPG" or "EPS". Additionally, you can specify the size and resolution of the exported image using the ImageSize and ImageResolution options.

Similar threads

Replies
2
Views
702
Replies
3
Views
2K
Replies
2
Views
2K
Replies
5
Views
2K
Replies
1
Views
1K
Replies
1
Views
1K
Back
Top