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
1
vote
1answer
21 views

How reduce resolution of a graph during export?

Suppose I have a density plot which I want to export in EPS format. But when tried using command, Export["/home/1.eps", %263, "EPS"] , the exported image has very large size (~100MB). How can I ...
2
votes
0answers
22 views

Exporting Texture to pdf with vectorized frame axes

If you export Graphics with frame like below ...
0
votes
1answer
50 views

Prevent Mathematica from uncapitalizing letters (specifically for letter I)

I need to use I/I0 to label my y-axis to denote intensity ratio, yet Mathematica converts both I-s to imaginary symbols(small letter I). I tried using Holdform[I/I0] but it does not work. Also, I ...
3
votes
3answers
133 views

How to plot a Histogram and compare with a particular probability density function PDF

I would like to know how to plot a make a comparison between a histogram and a set of random data, I have the following probability density function (PDF) which is given for this problem. I can ...
20
votes
2answers
2k views

Rasterize: Resolution option not working properly

Bug introduced in 7 or earlier and persisting through 12.0 Bug isn't present in version 5.2 Something about Rasterize which doesn't seem to work as intended. ...
9
votes
2answers
209 views

Issue with FrameTick marks in Mathematica 11.3

Bug introduced in 11.3 or earlier and fixed on 12.0. For a while I have been using the same code to make figures with tick marks pointing out from the axes away from the center of the figure. ...
6
votes
1answer
187 views

Bug in Export - known by Wolfram Support - upper plot margin depends on string length of upper horizontal axis label

Bug introduced in 9.0 and persisting through 12.0 or later ! See at bottom the answer by Wolfram Research. I am running Mathematica 10.3. For test purposes I have used the following code: ...
5
votes
1answer
80 views

Unexpected styling of a Button when used as PlotLabel

Bug introduced in 8 or earlier and fixed in 11.3 Reported to the support as [CASE:3984748] Consider the following plot with a Button placed as ...
18
votes
2answers
465 views

Creating graph out of particles images

I have recently started learning how to use Mathematica's brilliant image processing tools, and the image I've taken as first example is the following (source): So far I've tried to first use ...
6
votes
1answer
240 views

Plot points shifted (a lot) in output and PNG export but not in PDF export

Bug introduced in 8 or earlier and fixed in 12.0.0 Consider the following code: ...
1
vote
1answer
32 views

Interactively extracting arbitrary portion of elements from a 2D list

I have a 2D list which can be plotted as follows: Image 1 Based on the plotted image, I would like to select some of the shapes on the image and extract the data for further analysis, for example, ...
11
votes
3answers
1k views

Transform sphere into a cube

I'm trying to get into animation using Mathematica, and I want to create a simple animation where a sphere in a black space gets "morphed" into a cube. I know how to generate a cube and how to ...
2
votes
1answer
62 views

Vector field Stream?

The following graph shows the vector plot. How can I plot the solid lines which represents how the vectors are spatially varying and both on the same graph (vector plot and stream field)? ...
2
votes
1answer
65 views

What is meant by “curve” in the Mathematica documentation? [closed]

My system: Mathematica 11.2 I am missing something major in how to read the on-line help. Quoting from Mathematica help: Arrow[curve, …] represents an arrow ...
0
votes
1answer
42 views

An extraneous line appears in the printed version of a Mathematica-image in a pdf-document

My system/workflow Mathematica version 11 MikTeX 2.9: tex->dvi->ps->pdf->paper I have run into the following difficulty. I cannot tell whether the problem is caused by Mathematica, MikTeX, Adobe, or ...
11
votes
1answer
181 views

Option Lighting in the Show function does not work

Bug introduced in 11.2 or earlier and persisting through 12.0 There are something wrong when I try to evaluate the example from Lighting Docs, here is the code: <...
1
vote
1answer
41 views

Combine a List of Plots: Using MapThread with Show [closed]

I have a list of graphics p1 = Plot[x Sin[x] - 1, {x, -2.5, 2.5}] p2 = Plot[Evaluate[D[x Sin[x] - 1, x]], {x, -2.5, 2.5},PlotStyle -> Red] ListNew = {p1, p2}; ...
2
votes
1answer
65 views

Inconsistent Vector Plot over Contour Plot

I am trying to plot the gradient vector field over the contour plot of a function. While the demo function seems to work very well with the demo taken from How to use vector plot and gradient vectors?...
49
votes
4answers
4k views

Mollweide maps in Mathematica

Context In my field of research, many people use the following package: healpix (for Hierarchical Equal Area isoLatitude Pixelization) which has been ported to a few different languages (F90, C,C++, ...
1
vote
1answer
121 views

Rescaling and Image Padding Issues with GraphicsRow

I am trying to get a row of plots (which include legends and labels) using GraphicsRow, with vertical heights of the plots equal. I manually set the size and image padding of these plots so that the ...
16
votes
4answers
464 views

Create a simple split tree

I am trying to create a simple split tree. The growth should be only upwards, the vertical element length constant (1), the size of the horizontal bars should be halved in each iteration and the ...
1
vote
0answers
38 views

Combining MeshRegions of generated 3D shapes and RandomPolygons

I am interested in generating 3D a joint BoundaryMeshRegion or a MeshRegion from different shapes and polygons. This works for <...
1
vote
0answers
92 views

Calculate the intersection points of a line and a parametrically defined 3D surface

Thanks to Henrik Schumacher for advice to simplify the sample code: I would be grateful for any pointers on the following issue. A line from an external point intersects the surface at 2 points (...
0
votes
0answers
40 views

Discrete Sum of Function over a Region

I might have completely missed something in my search. I want to discretely sum over a function, $f(x_i,y_j)$ multiplied by some other function $g$ over a general region $S$. $$\sum_{(x,y)\in S}f(x,...
5
votes
1answer
56 views

How to construct BezierFunction for BezierCurve with npts>4 and SplineDegree -> 3?

I would like to use BezierCurve with npts=7 and SplineDegree -> 3 and access its BezierFunction. This code helps: ...
6
votes
3answers
1k views

Polygons crash kernel?

Having some problems Generating random Polygons and then filtering by Area, specifically filter out degenerated polygons with ...
10
votes
1answer
151 views
10
votes
2answers
486 views

Drawing Cylindrical Segment with Graphics3D

For a visualization I need a combination of 3 Cylindrical segments to visualize the incident, reflected and refracted beam of light at a surface. I got as far as the following code. ...
6
votes
3answers
698 views

How to count points under the curve?

I need a formula to calculate how many points are there under the curve $y=x$.
2
votes
1answer
57 views
6
votes
0answers
131 views

Bug: FrontEnd crash with Locator, Arrow and Dynamic

Bug introduced in 10.1 or earlier and fixed in Mathematica 11.3 [CASE:3731068] It does appear that Locator is not behaving properly and can seemingly crash Mathematica's Front-end, and I have ...
7
votes
2answers
411 views

Plot Taylor–Couette flow ilustratation plot

I am trying to plot a set up for a classic problem of physics of fluids using Mathematica, see Wikipedia for a reference. The problem is the movement of two concentric cylinders with two radii and ...
2
votes
1answer
55 views

How to plot a multivalued function in $\mathbb{R}^2$ using Mathematica?

First of all, consider the cubic equation $$x^3 + a = x. $$ Using Mathematica is easy to find real solutions of the above equation, ...
0
votes
1answer
74 views

How to show an arrow plot of a matrix with complex numbers?

I am trying to make a 3D plot of arrows showing the directions of my magnetic field on different points on a sphere. I am constantly facing errors about the scaling which I do not know how to fix. I ...
0
votes
0answers
34 views

Export of a graphics object with a fixed size

I am trying to generate a figure produced by Graphics command and export it to a pdf file having a fixed width. I followed the answer in these links, 1 and 2. These ...
7
votes
2answers
112 views

Exporting image and scale

Let us say I have a plot, for example that one: Plot[x^2,{x,0,5},AspectRatio->5] and I would like to export it as a PDF in such a way that if I print the PDF ...
7
votes
1answer
4k views

ImageSize as absolute (metric) value

I have wondered more and more often lately how the size of an image is handled when displayed or exported. The documentation implies that the via ImageSize the ...
13
votes
3answers
980 views

In version 9 PlotLegends, how can I remove the strange edges that appear around LegendMarkers?

I'm running Mathematica version 9. I am using ListPlot to plot two sets of data. For each data set, I am using different ...
1
vote
2answers
79 views

Bad output for SwatchLegend using LegendMarker with an EdgeForm

Consider the following input which should give a legend with a red rectangle and a black frame: ...
13
votes
2answers
284 views

Tube and CapForm

EDIT Bug still present in version 12 when number of coordinates is large. See answer below by kglr. Original Post I am using version 10 to draw tubes. With the CapForm set as Butt the first pipe ...
2
votes
1answer
68 views

Remove the background color

How do I remove the background color from the drawn graphic? When I insert the Mathematica-derived plot image (.emf) into the Word, I always find a white background color. How do you make these ...
36
votes
3answers
4k views

How to translate interactive graphics from Mathematica to standard HTML+SVG?

I have a simple interactive plot in Mathematica, with controls for various parameters. The point of the plot is simply that users can explore how the plot changes as the parameters change by ...
1
vote
3answers
73 views

ContourPlot3D not wotking for slicing z axis in the ranges of 10^-13

I am using ContourPlot3D to obtain a slice plane at z = constant. However I find that the plane's position is not moving when the range is of the order of 10^-13. I am using the following code. ...
7
votes
4answers
179 views

Construct, in some manner, a four-dimensional “RegionPlot”

Let me abuse some Mathematica notation and formulate the following "command": ...
5
votes
4answers
1k views

Creating a realistic, photo-like 3D effect from an image or document

Suppose I have an image or a document, provided in a high-quality PDF file. You can open and view it in a PDF viewer, but then it has a kind of static look: it's not something tangible, it's just an ...
5
votes
0answers
78 views

How to export high dpi PDF graphics at a low physical dimension with small file size?

Exporting PDFs While it is seemingly obvious how to export higher resolution pdf vector graphics: https://mathematica.stackexchange.com/search?q=pdf+export+high+resolution There is nothing to be ...
2
votes
1answer
45 views

How to join two graphics generated from paired-points lists?

The Fig.1 and Fig.2 are generated from two lists, Fig.3 is joined and edited from Fig.1 and Fig.2 in Adobe Illustrator, the codes and figures as follows. I want to know how to get Fig.3 by Mathematica ...
4
votes
2answers
121 views

Align y-Axes in Overlay plot

I learned about how to plot two datasets in a single plot with two y-axes by using Overlay as has been done in one of the answers in this question. Now, my ...
2
votes
0answers
41 views

Encoding spatial data in Mathematica

I am doing some experimentation with machine learning and robotics, and want Mathematica to be my primary platform. For it, I need to represent a room with some obstacles (circles) and a goal (square)....