Questions tagged [graphics]

Questions on the construction of 2D and 3D graphics through the direct use of primitives, directives, and functions. Include the graphics3d tag for questions specifically on 3D graphics. This tag is not to be used for basic questions on visualizing functions and lists using the various flavors of Plot commands.

Filter by
Sorted by
Tagged with
32 votes
2 answers
3k views

Plot Option Precedence while combining Plots with Show[]

I like to build sophisticated plots by combining simpler ones with Show[]. Typically this involves setting non-default Plot-Options with the different Plot-Commands,...
uli's user avatar
  • 1,365
140 votes
9 answers
36k views

$\LaTeX$ and Mathematica

I quite often would like to draw graphics in my $\LaTeX$ documents using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems I would ...
Thomas Rot's user avatar
  • 1,503
114 votes
6 answers
30k views

Exporting graphics to PDF - huge file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with ...
Matthew Leingang's user avatar
19 votes
4 answers
3k views

Retrieving the ImagePadding in absolute units

Consider the following graphic: g = Graphics[Circle[], Frame -> True, FrameLabel -> {"one", "two"}] Retrieving the ...
Szabolcs's user avatar
  • 234k
106 votes
3 answers
15k views

Recovering data points from an image

Unfortunately, some data can only be obtained in picture form (Japanese publications anyone?). Since this cannot be worked with, it has to be converted to a dataset that can; I was wondering whether ...
David's user avatar
  • 14.9k
76 votes
4 answers
8k views

An efficient circular arc primitive for Graphics3D

As many people have noted, the 2D graphics primitive Circle doesn't work in a Graphics3D environment (even in v10.0-v10.4, where ...
Sjoerd C. de Vries's user avatar
69 votes
4 answers
6k views

Point Renderings Slightly Off in Mathematica

The Mathematica code ...
Tyson Williams's user avatar
30 votes
6 answers
8k views

Plotting several functions

I'd like to plot a function of one real and one integer variable, but I don't want them all shown in the same 2-D plot - I'd like to see them as separate curves so I can see both "axes", more like how ...
stopple's user avatar
  • 1,141
146 votes
3 answers
23k views

How to manipulate 2D plots?

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...
István Zachar's user avatar
30 votes
5 answers
3k views

How to get the real PlotRange using AbsoluteOptions?

Bug fixed in 13.0.0 The problem in general involves the unreliable behaviour of AbsoluteOptions when option values are implicitly specified (e.g. ...
Silvia's user avatar
  • 27.5k
77 votes
3 answers
8k views

How can we make publication-quality PlotMarkers without version 10?

Suppose that for certain reasons we are not yet using Mathematica version 10, or we have a version with buggy PlotMarkers. It is well known that the default markers ...
Oleksandr R.'s user avatar
48 votes
7 answers
6k views

Extruding along a path

I'm trying to render a 3D image of a path by extruding a circular cross-section along the path, to create a "snake-like" path. Here is an image I found to illustrate: I can't seem to figure out if ...
s0rce's user avatar
  • 9,602
29 votes
2 answers
2k views

Where can I get detailed information on how the Plot command works?

The command Plot[x^2, {x, -3, 3}, PlotStyle -> Arrowheads[{-.025, .025}]] /.Line -> Arrow produces this output. What I don't understand is what ...
user avatar
83 votes
4 answers
17k views

Placing a ContourPlot under a Plot3D

I would like to combine a 3-dimensional graph of a function with its 2-dimensional contour-plot underneath it in a professional way. But I have no idea how to start. I have a three of these I would ...
QuantumDot's user avatar
  • 19.6k
45 votes
3 answers
6k views

Avoiding white lines inside filled area in RegionPlot exported as PDF or PS

Bug introduced in 8.0 or earlier and fixed in 13.2 or later When doing a RegionPlot and then exporting (or saving from the front end) as PDF or EPS, there are ...
celtschk's user avatar
  • 19.1k
45 votes
2 answers
4k views

Aligning plot axes in a graphics object

I need to align the y-axes in the plots below. I think I'm going to have to do some rasterizing and searching for vertical lines, then vary x and ...
Chris Degnen's user avatar
  • 30.9k
52 votes
7 answers
4k views

Character edge finding

The following line of code finds the edge of a character: ...
Sjoerd C. de Vries's user avatar
91 votes
4 answers
55k views

How to create a new "person curve"?

Wolfram|Alpha has a whole collection¹ of parametric curves that create images of famous people. To see them, enter WolframAlpha["person curve"] into a Mathematica ...
Simon's user avatar
  • 10.1k
47 votes
5 answers
14k views

ListPlot with each point a different color and a legend bar

I would like to generate a ListPlot with the color for each point in the plot corresponding to a particular value (not associated with the position in the plot). I'...
Cassini's user avatar
  • 5,556
23 votes
3 answers
5k views

Generating hatched filling using Region functionality

Before v.10 came out there were several Q&A on generating hatched filling for Plot, ListPlot etc. In v.10 we have new ...
Alexey Popkov's user avatar
58 votes
5 answers
12k views

How can I extract data points from a black and white image?

Consider the following graph (source): Is there any way to extract the data points from this image in a semi-automatic way? I have seen, and tried the methods suggested in this question, but they did ...
Eli Lansey's user avatar
  • 7,459
49 votes
6 answers
9k views

Filling a polygon with a pattern of insets

I am trying to fill a shape with diagonal lines. I am aware of Texture, but it rasterizes the fill pattern, which is not desirable. Here was my crack at it: ...
Guillochon's user avatar
  • 6,117
40 votes
3 answers
4k views

Antialiasing in 3D

Is it possible? Is it platform specific? Does it rely on the graphics hardware? Why does the antialiasing slider under Preferences > Appearance > Graphics do nothing? I remember seeing some post-...
István Zachar's user avatar
20 votes
3 answers
38k views

How can I transpose x and y axis on a Plot?

This question has appeared in various forms online, but I have not yet seen a complete answer, so I am posting it here. More specifically, suppose I have a function ...
merlin2011's user avatar
55 votes
8 answers
9k views

How to plot ternary density plots?

How can I get a ternary density plot just like the plots from OriginLab? ContourPlot and DensityPlot seemingly can accept the <...
Scott Wang's user avatar
49 votes
7 answers
10k views

Intersecting graphics

Does the Mathematica graphics system have any concept of intersecting graphics? I've not found much in the documents so far. For example, if I want to show the intersection of two shapes: ...
cormullion's user avatar
  • 24.2k
24 votes
3 answers
4k views

Removing unwanted appearance of underlying mesh

Let us first define two positive definite matrices: M1 = {{2, -6}, {4, 8}}; M2 = {{2, 3}, {4, 8}}; then set two points ...
Dror's user avatar
  • 1,831
37 votes
6 answers
35k views

Flipping axis on a plot

I want to make a 2D plot where the x-axis is flipped so the higher numbers are on the right and lower numbers are on the left. I've managed to do it by flipping the data and making new ...
s0rce's user avatar
  • 9,602
35 votes
4 answers
7k views

Real Size Image Printing

I am generating a complicated graphics with Mathematica, but with objects of given sizes (e.g. a line of length 1 inch, between two points). I want to make sure that when I export the graphics, e.g. ...
Yigal Meir's user avatar
20 votes
5 answers
831 views

Prevent graphics from rendering inside a held expression

Assuming each odd line is input I would like the even lines to be the output of the following lines. In the above the Graphics are inside ...
William's user avatar
  • 7,595
18 votes
3 answers
1k views

How to align coordinate systems of Inset and enclosing Graphics?

Suppose we have some plot with AspectRatio not being Automatic: ...
Alexey Popkov's user avatar
40 votes
5 answers
1k views

How to examine the structure of Graphics objects

One difficulty I'm encountering in studying the structure of Graphics objects is that I have not yet found a way to print or display such structures that are ...
kjo's user avatar
  • 11.7k
31 votes
2 answers
2k views

Smoothing 3D contours as post processing

Context Following this question (and great answer!), It would be nice to have a function which also smooths 3D contours plots once they have been done. There are various solutions which involve ...
chris's user avatar
  • 22.8k
30 votes
3 answers
3k views

"Covering up" text in Graphics

Consider the following code: ...
Steve D's user avatar
  • 2,189
149 votes
4 answers
26k views

How to create word clouds?

Word clouds are rather useless fancy and visually appealing plots, where words are plotted with different sizes according to their frequency in a corpus. Many applications exist out there (Wordle, ...
István Zachar's user avatar
33 votes
7 answers
25k views

How to draw a Circle in 3D on a sphere [duplicate]

The Circle function is strictly a 2D Graphics object, so that we cannot directly combine a ...
DozzyCooper's user avatar
33 votes
2 answers
1k views

Graphics elements do not line up perfectly in exported PDFs

Bug introduced in version 9.0 and persisting through 10.4 Graphics elements do not always line up perfectly in exported PDFs using "Save As..." method. Take, for example: ...
Szabolcs's user avatar
  • 234k
32 votes
3 answers
2k views

Consistent Plot Styles across multiple MMA files and data sets

I am starting to write a thesis for which I want to use MMA for all my plotting needs, mostly because a lot of the basic analysis has been done there. To ensure that I am applying styles consistently (...
tkott's user avatar
  • 4,939
30 votes
4 answers
3k views

Scale Insetted Characters to Plot

I am trying to place a curly brace within a plot such that the top/bottom of the curly brace line up with two horizontal lines in the plot: I have not been able to find a way to make the curly brace ...
Guillochon's user avatar
  • 6,117
9 votes
2 answers
3k views

Create complicated text formulas in graphics

I want to put somewhat complicated, or at least non-standardly formatted, text on some of my graphics. For example, I'd like to be able to use f^[4](x) (where the <...
rogerl's user avatar
  • 4,209
75 votes
6 answers
15k views

How can this confetti code be improved to include shadows and gravity?

Here's some confetti: ...
David's user avatar
  • 14.9k
39 votes
5 answers
22k views

Plotting Error Bars on a Log Scale

I have a plot with ErrorListPlot ...
s0rce's user avatar
  • 9,602
34 votes
5 answers
4k views

Is there a way to outline text?

If I have: Graphics[ {Red, EdgeForm[Directive[White, Thick]], Inset[Style[Text@"Hi!", 44], {0, 0}]}, Background -> Black ] I unfortunately get: ...
VF1's user avatar
  • 4,702
33 votes
6 answers
5k views

How can I wrap text around a circle?

How can I wrap text around a circle? For example: the text in the sectors of this chord plot. Perhaps one could use FilledCurve[] and then apply a ...
M.R.'s user avatar
  • 31.4k
31 votes
4 answers
4k views

How to extrude a 3D image from a binary 2D image

I'm trying to extrude a nice 3D form from the 2D binary image below using the code posted, but I haven't had any luck in figuring out the error that's keeping ...
Nothingtoseehere's user avatar
26 votes
1 answer
1k views

More Ticks::ticks errors in AbsoluteOptions in v10

Bug introduced in 7.0 or earlier, fixed in 13.0. While the specific bug affecting Plot described in AbsoluteOptions prints error messages in V10 has been fixed in ...
Mr.Wizard's user avatar
  • 271k
25 votes
7 answers
5k views

Find intersection of pairs of straight lines

I have a list of 24 points, in which two consecutive points (1st and 2nd, 3rd and 4th, …) are supposed to form a line: ...
seismatica's user avatar
  • 5,101
13 votes
2 answers
7k views

How to align rotated tick labels?

How can I align tick labels so the tick label text ends centered under the data point? Of Course it works fine with a rotation of 90 Degrees, but not with 45 or similar angles. I see an example of ...
Davorak's user avatar
  • 407
10 votes
1 answer
1k views

Why does the order of arguments in Show influence the result? [duplicate]

I am wondering why there is a difference in the results from evaluating the two expressions, which differ only in the order of the arguments given to Show. When I ...
Lawerance's user avatar
  • 517
61 votes
3 answers
4k views

How can I add drop shadows and specular highlights to 2D graphics?

I thought I'd share some code in the form of a self-answered question, but other answers are of course welcome. Drop shadows are a familiar visual effect, giving the impression of a graphical element ...
Simon Woods's user avatar
  • 84.9k

1
2 3 4 5
25