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
34 views

Combining graphics twice

I have a for loop that produces a few line plots. After it is produced, it is appended together, and I'm using the "Show" command to combine the plots together. As shown in the example code below: <...
1
vote
2answers
46 views

Provide a list of colours for the points of ListPlot

I want to colour the points in a ListPlot with a list of colours, i.e. something like ...
1
vote
4answers
50 views

Area-colored phase diagram for various ranges of f(a,b), given the ranges of a and b

Is there a way to plot a simple diagram in Mathematica with colored areas, like a phase diagram, for the different ranges of values of a function such $f(a,b)=(1-a)/(b+2)$, for various combinations of ...
0
votes
0answers
25 views

How to add a custom indicator to InteractiveTradingChart or TradingChart?

I'm creating a prediction algorithm for certain stocks and I wanted to plot the result of my predictor against the stock's history. I wanted to create my custom "indicator" to add to a ...
1
vote
1answer
30 views

ContourPlot a list of equations generated by the Table command

The first command below produces proper contour lines while the second command produces an empty plot. I would think that the two commands should produce the same output. What's going on? ...
0
votes
0answers
28 views

Why did my code only pop up only one graphic object? How can I correct it? [on hold]

Here are codes I used to produce 2 functions in 1 plane. a(x+4) was the only function manifested in the plane. ...
3
votes
2answers
161 views
+100

Rotating squares animation

Reference link: https://www.geogebra.org/m/RHYH3UQ8 , https://www.geogebra.org/m/xkzsqcyx , https://www.netpad.net.cn/svg.html#posts/55789 I want to generate an rotating squares animation like this, ...
1
vote
1answer
72 views

How to construct a specific binary tree from a particular set of information?

I run a algorithm to solve a problem that return a set of information relative to a binary tree associated with these problem. For illustrate the results obtained I try to plot the binary tree. I make ...
3
votes
0answers
32 views

Mathematica Support for Simulating Kirigami Cuts

We can easily draw a grid like GraphPlot[GridGraph[{12, 12}], GraphLayout -> {"GridEmbedding", "Dimension" -> {12, 12}}] This gives us Does Mathematica ...
1
vote
1answer
46 views

Apply non-linear transformation to graphics object

I would like to define some simple geometric primitives (e.g. points and lines) and see what happens when I transform them by a non-linear transformation (in my case $(x,y)\mapsto (\sqrt x,\sqrt y)$). ...
5
votes
1answer
73 views

How Does StreamPlot Handle Singularity or Indeterminates?

I will like to know how StreamPlot finds its way around singular/indeterminate values. Actually, I was thinking of using ...
4
votes
1answer
78 views

Colorize specific region in plane

The plane is divided into a grid and points is distributed on it. ...
1
vote
1answer
87 views

Draw a figure made of lines and put labels on some

I want to put $ \Delta y_{1} $ in the magenta line, $ \Delta y_{2} $ in both red lines, $ \Delta L $ in the yellow line and $ L $ in the line that is continuation of $ \Delta L $. Either using my ...
3
votes
2answers
67 views

GeoRegionValuePlot with a custom color function

I used unscaled coordinates with a custom color function to visualize data for life expectancy in African countries (see code below). Five intervals for five colors. But it seems tha WM choses the ...
0
votes
1answer
67 views

Change a formula [closed]

have a program consisting of a database of colors in L-a-b format. I want a formula to obtain the desired color by mixing different amounts of colors that are in the database. For example: I want ...
7
votes
2answers
413 views

How to prevent graphics clipping through each other

Consider the following: ...
0
votes
0answers
42 views

Resizing graphics in Mathematica [duplicate]

My Mathematica graphics are very big documents (more than 20 M). How can I make them smaller (not more than 1 M)?
3
votes
2answers
69 views

Divide `Graphics` `Line` into `i` equal lengths

I have a line given by ...
1
vote
0answers
48 views

Image option is initialized when a graphic is in { }

It is helpful(necessary)to read the following before proceed: view is not fixed completely regardless of vewpoint I found that, if a graphic code is surrounded by { }, the output becomes as if the ...
2
votes
2answers
62 views

Labeling Legs in a Loop on a graph

I am trying to make a graph with some loops such as this one, ...
3
votes
1answer
37 views

Moving the position of the gray line in the plot

I have been making cantor type sets. I have the following code, how to lower the position of gray lines a bit so that I can see the intersection. The code is: ...
1
vote
1answer
36 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
24 views

Exporting Texture to pdf with vectorized frame axes

If you export Graphics with frame like below ...
0
votes
1answer
54 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 ...
1
vote
1answer
33 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, ...
3
votes
3answers
146 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 ...
2
votes
1answer
71 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
68 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 ...
1
vote
1answer
42 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
67 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?...
1
vote
0answers
40 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 <...
18
votes
2answers
506 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 ...
0
votes
1answer
43 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 ...
0
votes
0answers
41 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,...
1
vote
0answers
96 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 (...
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 ...
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: ...
10
votes
1answer
153 views

Why does BezierFunction not follow BezierCurve at npts>4?

This example: ...
6
votes
3answers
705 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

PlotMarkers problem on some stylesheets

Sample data: ...
2
votes
1answer
59 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
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
119 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 ...
2
votes
1answer
70 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 ...
5
votes
0answers
82 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 ...
4
votes
2answers
128 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
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 ...
2
votes
0answers
42 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)....
7
votes
4answers
179 views

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

Let me abuse some Mathematica notation and formulate the following "command": ...
1
vote
0answers
45 views

Tools that can convert mathematica images into tikz or pgf code to import to latex?

I have learned about Mathematica2latex from some websites, I don't know where to download it and how to use. Is there any other tools that can convert mathematica images into tikz or pgf code to ...