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.
1,240
questions
10
votes
3
answers
3k
views
Hovering mouse cursor over a plot to display a "corresponding" point in another plot
I'm trying to reproduce a variant of this view, where hovering the mouse over a point highlights its "corresponding" point on all plots:
In my case, the additional complexion is that the x-axes are ...
10
votes
1
answer
353
views
Inserting county names on a map
I'm attempting to insert the county names on a map of Florida:
...
10
votes
2
answers
2k
views
Create a Venn Diagram
I would like to create a Venn Diagram, but I have not found any documentation about it.
There is a lot of information about Intersection, but not much about ...
9
votes
2
answers
4k
views
How to set the ratio between the vertical and horizontal scales of plots?
The documentation says that when AspectRatio->Automatic is specified, Mathematica
determines the ratio of height to width from the actual coordinate values in ...
8
votes
2
answers
791
views
Is it possible to induce Mathematica to chop off parts of Graphics objects that exist outside of a Frame?
I am running Mathematica 7. In a Graphics environment I am setting Frame -> True (and using ...
8
votes
1
answer
3k
views
Constructing primitive cell using information from ChemicalData
I would like to construct a primitive cell (figure shown) and possibly the two-dimensional layout (figure from here) using the following input. Any clues as to how this can be done?
...
8
votes
2
answers
1k
views
Fit an image within a Rectangle [] in Graphics
Based on the following Code (yet the white text in the image is added with PPT), I would like to have an image fit within one of the rectangle.
For Example the image from there :
http://...
8
votes
3
answers
381
views
Inset in ArrayPlot
Bug introduced in 9.0 or earlier and persisting through 11.0.1 or later
It seems the options in the Inset object will be ignored when passing to ...
8
votes
1
answer
2k
views
Discrete-time Lyapunov exponent plot
I am trying to create a Lyapunov exponent plot as a function of $\alpha$ for two functions:
$$
f(x) = (\alpha + 1)x - \alpha x^{3}
$$
and a piecewise function given by following Mathematica code:
<...
8
votes
3
answers
4k
views
How to get the coordinates of the intersection of two lines from a ListLinePlot?
Suppose I have two curves intersect at some point, how can I read the coordinates from the graph, not read by eye, but find it with more precision by computer.
For example, here are two lists created ...
8
votes
4
answers
2k
views
How to combine ArrayPlots?
Define:
fat = ArrayPlot[RandomReal[1, {20, 10}], ColorFunction->"Rainbow"];
skinny = ArrayPlot[RandomReal[1, {20, 1}], ColorFunction->"Rainbow"];
What ...
8
votes
1
answer
455
views
Synchronizing manual rotations for multiple Graphics3D outputs?
Say I make a set of three Graphics3D images, here of three different cones, by evaluating:
...
8
votes
4
answers
2k
views
How to rotate TickMarks in DateListPlot?
Is there a way to rotate TickMarks in DateListPlot to avoid overlap, eg:
Part of the code used to generate this is:
...
8
votes
1
answer
237
views
Why does a heavy background slow LocatorPane from updating, even if only the locators are Dynamic?
I'm having some trouble getting a dynamic plot to operate efficiently, and I think I've tracked down at least part of the problem to some pretty weird behaviour on the part of ...
8
votes
2
answers
407
views
Extracting values from a Bézier curve in Mathematica
given a list of points I've created a Bézier curve, and now I would like to understand how to extract a "middle point" from a curve or get a list of points (not the input ones, the ...
7
votes
1
answer
2k
views
Label area on plot
I created the following plot using Mathematica:
...
7
votes
3
answers
1k
views
Opacity and overlapping multiple polygons
Let's say I have 100 polygons that are all different but most of them overlap. All I want to do is to draw/plot them in one single graphic with linearly adding gray values; i.e., a point with ...
7
votes
2
answers
2k
views
Color mixing or blend
Color mixing seems not only one type.
Here is RGB_color_model
I wrote this one:
...
7
votes
2
answers
910
views
Rectangle with rounded edges
Inspired from :
Fit an image within a Rectangle [] in Graphics
I would like now to fit an image within a Rectangle[] with rounded edges as shown in the example below :
Is it possible ?
7
votes
2
answers
2k
views
ListContourPlot interpolation screws up on concave set of data
I want to create ListContourPlots for sets of Data (from a physics simulation) given as Triplets {x, y, f(x, y)}. Certain parameter regions in the x-y-plane are ...
7
votes
1
answer
1k
views
Converting 3D graphics to 2D for better export
I noticed that exporting a Graphics3D object into a vector graphics format, like SVG or PDF, produces a rasterized version of the graphics, while 2D objects are ...
7
votes
1
answer
956
views
How to show the projections of 3D orbit on the three primary planes
Perhaps this question has been asked before but even though I searched the site I did not find what I want.
The code is rather simple:
...
6
votes
1
answer
320
views
Change the default font in all plots and legends, even when exporting to PDF
This is a followup to:
How can I change the default font used in ALL plots and legends in Mathematica?
Carl Woll gave a great answer there: change the "Graphics" ...
6
votes
2
answers
2k
views
Using ChemicalData to make molecule graphics
$\require{mhchem}$I would like to take the acetone $\cf{((CH3)2CO)}$ and chloroform $\cf{(HCCl_3)}$ molecules that Mathematica's chemical data provides, and plot them together. I want to show how ...
6
votes
3
answers
245
views
Maintaining shape size while rotating in GraphicsGrid
I've the following snippet, simplified from a more complex code:
...
6
votes
4
answers
1k
views
How to embed a filled Region in a Graphics?
Let for example:
regn = RegionDifference[Rectangle[{-2, -2}, {2, 2}], Disk[{0, 0}, 1]];
The only documented way I found to draw a gereric region ...
5
votes
2
answers
1k
views
ParametricPlot3D colorfunction for a specific region of an object
I have created a 3D parametric plot of an oblate spheroid, and I want to apply "TemperatureMap" as a colorfunction to its surface as a gradient in the Z direction. However, I only want to apply this ...
5
votes
3
answers
4k
views
How do I make a log plot where the plot is logarithmic in the distance from the X-Axis (including negative values)?
For example, if I were to do a plot of Sin[x], I would get what looks like a Log plot of Sin[x], with another log plot of ...
5
votes
1
answer
354
views
What are Epilog x-Axis Positions In BoxWhiskerChart (with BarSpacing option)?
I have a dataset that has a number of groups with overlapping sets. There is a point in the group within the intersection of the sets that I want to highlight by placing a marker of that point between ...
5
votes
1
answer
2k
views
Epilog does not work as expected with Show [duplicate]
I was trying to answer this question (here) and I found that I can't use Epilog with Show. consider this Example:
...
5
votes
2
answers
252
views
MoleculePlot always returns an empty plot
Bug introduced in 12.1.0, persisting through 13.0 and fixed in 13.1
MoleculePlot@Molecule["O=C(C1CCC1)S[C@@H]1CCC1(C)C"]
This is a documented example ...
5
votes
1
answer
2k
views
Isomorphisms for graphs with loops and multiple edges
I am working with graphs with multiple edges and loops, and I want to eliminate all isomorphic graphs from a long list I've generated. The FindGraphIsomorphism ...
5
votes
2
answers
2k
views
Extrude 2D cross-section to 3D shape with shrinkfactor
I would like to create a 3D shape from extrusion and scaling of a 2D contour. The 2D contour that I have looks like this:
and it consists of a bunch of points (here plotted with ...
4
votes
2
answers
508
views
Exporting graphics without X server [duplicate]
I have a Mathematica installation on a Linux server that is intended to be used for batch processing. Some of the things that will be processed will include rendering of graphics. However, if I use <...
4
votes
1
answer
276
views
Blunt arrowhead when exporting 2D plot
I have the following code to generate a 2D plot:
...
4
votes
2
answers
149
views
Cell copy results in jaggy, aliased output
When I copy a cells by selecting them from the collapse bars on the right, then using the context menu option "Copy", the pasted image of plots is not anti-aliased and in general the text seems to ...
4
votes
2
answers
689
views
Axes labeling with superscripts
I need to label the y-axis of a plot with the form a/GeV^-1, where ^ denotes superscript. But Mathematica always write ...
3
votes
2
answers
870
views
Rules governing Plot line generation
I was looking at the Documentation Center for Round, Ceiling and Floor when I noticed that ...
3
votes
3
answers
3k
views
Phase portraits and StreamPlot
I typed
StreamPlot[{y, x-x^3-0.3y+0.5Cos[1.25t]}, {x, -2.5, 2.5}, {y, -2.5, 2.5}]
but all I got was a blank plot. What did I do wrong and can I fix it?
3
votes
2
answers
1k
views
Manipulate a 2D point controlled simultaneously by Locator and its coordinates
I'm trying to have a point in the plane which can be manipulated both using Locator as well as inserting its $x$ and $y$ coordinates. My attempts at doing this are:
...
3
votes
1
answer
1k
views
Combining Histogram and SmoothHistogram
How can we draw Histogram and SmoothHistogram together for two data sets?. I'd like to show the first data set using ...
2
votes
1
answer
327
views
How to write scalable Frame Labels
Is there any way to label frames in latex like fashion which (label text) also scale appropriately on zooming the plot?
2
votes
3
answers
4k
views
How to color a contour plot over a subset of colors displayed in the bar legend
This seems real easy but I can't find the answer. I have a few contour plots that I am combining and want to use only one bar legend that captures all the values. Given that I know the range of values,...
2
votes
2
answers
200
views
Region between finite lines or extracting a finite tesselation
EDIT2 the answers here (How to compute intersections of circles on a lattice) seem like they could help or solve the problem.
EDIT: I saw this question about finding regions between lines before I ...
2
votes
1
answer
4k
views
Animate curve parametric plot on a surface
I have a surface
s = Plot3D[{x,y,F[x,y]},{x,-1,1},{y,-1,1}]
with $F$ predefined, and a curve
...
2
votes
2
answers
2k
views
How can I get even steps on x and y axes in a plot?
I'm plotting the shortest distance from a point to a line using the following code
...
2
votes
1
answer
481
views
Why is this expression being held, and how can I evaluate it?
I can't figure out why an expression isn't evaluating, even though there's no Hold* in its FullForm:
...
2
votes
1
answer
380
views
Axes behind plot lines
If I do a plot and want both the horizontal axis and a frame I can do this:
...
2
votes
1
answer
2k
views
Basins of attraction of equilibrium points
The Henon-Heiles potential is the following
V = 1/2*(x^2 + y^2) - y*(1/3*y^2 - x^2);
which has four equilibrium points
...
1
vote
1
answer
198
views
Change mesh density of Graphics3D object made of Triangles
I am new to mesh discretisation on Mathematica. I have a Graphics3D object made up of Triangles, that I would like to convert ...