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 ...

learn more… | top users | synonyms

3
votes
3answers
161 views

How to read the intersect corodinate of two lines from the 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 ...
3
votes
3answers
108 views

How to use Show in case one of the graphics doesn't exist?

I tried to combine three and more graphics with the Show command; but sometimes there is no data, so some of the graphics are empty lists. I tried this: ...
3
votes
2answers
622 views

Mapping points on the unit circle

I have a set of points P that are evenly spaced on a square grid of length 1. I would like to map these points to the circle of radius 1 as nicely as possible, while preserving relative positions as ...
3
votes
2answers
988 views

Add coordinate axes to a 3D plot of concentric spheres

I want to add coordinate axis to a figure of nested spheres. I have the command. ...
3
votes
2answers
835 views

Animating a 3-D arrow given the vector's x, y, and z components as a function of time

I am trying to show how a vector M varies over time. I have the following code: ...
3
votes
4answers
507 views

Interpolating a plot with missing values

With data = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 5}, {8, 4}, {10, 3}, {10, 2}, {11, 1}} and ...
3
votes
3answers
206 views

How to convert an output of a matrix into a PNG image?

Using @m_goldberg's code I have created a matrix with the following command: ...
3
votes
3answers
531 views

How to simultaneously change the color and thickness in ContourStyle?

When plotting contours with ContourPlot, one can use the option ContourStyle to change the contours of the plot. With the ...
3
votes
4answers
213 views

Rectangles of the Same Size Aren't Shown the Same!

I've written a mathematia code which arranges $n$ unit squares in columns of length $m$ (of course, when $n$ is not divisible to $m$, then the last column is not full). This is the code: ...
3
votes
2answers
853 views

X label in GraphicsColumn is cut off

I'm trying to use GraphicsColumn to plot two curves with very different ranges. for example, ...
3
votes
3answers
158 views

Colorize an image using two parameters

I have a matrix of data. I use Colorize[Image[Rescale[data]],ColorFunction->"Rainbow"] to create an image from the data where the value of each pixel is used ...
3
votes
3answers
265 views

Connect each point in the plot with all adjacent points

I have the following simple code. I need to connect each point in the plot with all adjacent points in vertical or horizontal line. ...
3
votes
2answers
1k views

How can I invert the colors in a color bar

I have this Mathematica code ...
3
votes
2answers
1k views

Trying to generate a list of data to plot a graph with error bars. Need help creating the looping function

This is the sets of data I want to put into a form which will allow me to plot error bars from the min and max data. ...
3
votes
2answers
238 views

Rotate doesn't work with BarChart and BoxWhiskerChart

Rotate@BarChart[RandomReal[1, {4, 5}], ChartLayout -> "Percentile"] Even though the FullForm generated by BarChart is Graphics expression, Rotate has no ...
3
votes
2answers
121 views

Changing location and direction of axes

I need to produce a plot that looks something like this: from a function definition where z (the vertical axis) is the independent variable. I can easily invert ...
3
votes
2answers
529 views

Adding labels and numbers in axes

Let's see the following test case ...
3
votes
1answer
290 views

ContourPlot is slow and unwieldy and generates a large-data graphic

I'm constructing a single contour showing the points in a plane that satisfy a function. The general form is ContourPlot[f[x, y] == 0, {x, 0, .5}, {y, 0.2, .5}] ...
3
votes
1answer
196 views

ListPlot with conditions

I have a data file containing the position of about $10^5$ stars of a spiral galaxy. Here is the plot and this is the corresponding code ...
3
votes
2answers
1k views

Generating an Airy disk on a plane

I wish to generate a surface intensity plot of an Airy disk (or perhaps a two-dimensional Gaussian approximation to an Airy disk) on an (x, y)-plane at a specified coordinate. The hope is to have ...
3
votes
2answers
183 views

Adding dynamic graphics to an animation

I'm making this demonstration that draws a parametric plot of the unit circle, while at the same time has two plots off to the side that draw the sine and cosine curves. I have this made up as an ...
3
votes
2answers
192 views

How to cut a thick curve in half lengthwise?

Is there any easy way to cut a thick curve in half lengthwise? Example: suppose I have the cardioid shown in the figure below, is there a way to delete either the inner or the outer portion of the ...
3
votes
4answers
452 views

drawing core-shell structure [duplicate]

I am pretty new in Mathematica drawing. I am trying to draw a core-shell structure, it means a core sphere with a shell sphere, like this It can be in 2D or preferentially in 3D. Does someone can ...
3
votes
3answers
323 views

How to combine a plot with an image

I have an external data file data which contains the position of stars of a galaxy simulations and it looks like this ...
3
votes
1answer
570 views

How to insert a plot into another overlay plot

I want to insert a plot into another overlay plot. Here is my code: ...
3
votes
2answers
140 views

Moving a locator based on the movement of another

My problem is: I want two Locators to simulate a vector in the following sense: The first Locator is the base and the second ...
3
votes
2answers
1k views

Creating a grid of plots [duplicate]

I'm really a noob on Mathematica. I would like to create a layout of multiple plots in Mathematica. I've a function that calculates the solution, over time, of a system of differential equations. ...
3
votes
2answers
440 views

Plotting the deformed shape of a rectangle

I want to plot a rectangle using graphics : rc = Graphics[{Blue, Rectangle[{0, 0}, {1, 1}]}]; and add a deformation function to it: $$\chi(\mathbf ...
3
votes
1answer
154 views

Use NotebookWrite with Graphics?

I am trying to use NotebookWrite to paste a plot into another notebook. The code looks something like: ...
3
votes
4answers
3k views

how to draw a moving point on a curve?

I almost remember an example that has a moving red point on a given curve, which will moving time and time again, with no controls... now, here is my question: given a curve by ...
3
votes
2answers
208 views

Uniform scaling of a Table of Graphics objects?

Row[Table[Graphics[Rectangle[{0, 0}, {2^k, 1}]], {k, 0, 5}]] yields However, I'd like uniform scaling of the rectangles, i.e., each rectangle should look twice ...
3
votes
1answer
98 views

Adding text on an .xyz file of an atom

I know it is possible to view .xyz files of coordinates in Mathematica. I tried to write some text on a specific atom using Text, but I was not successful. How can i do that? Thanks for the help in ...
3
votes
2answers
93 views

Difference Colored legends from main plot

I am using the below code to create legends but I don't know why the colors in legends for various plots are different of devoted to main color of plots From ...
3
votes
2answers
115 views

Customized ListPlot

I have an external data file containing the elements (t,x,y,px,py) of an orbit. Here is a sample data file. Now I want to ...
3
votes
2answers
140 views

Determine distance between two lines in an image

I have the fallowing image: http://postimg.org/image/qv7q9geuh/ In this image there are 5 more or less vertical peaks in total. Let the x-axis be the horicontal axis and y-axis be the vertical axis. ...
3
votes
2answers
102 views

how to use filling in Graphic plots

i'm going to plot some angles in Trigonometric circle by using Graphic command how can i use filling axes by different colors in this program or color between the angles? ...
3
votes
1answer
89 views

How to get the size of a specific image in the front end?

The title pretty much says it all. One possible point of confusion is that this question is not limited to items with head Image. I don't know what is the ...
3
votes
2answers
189 views

Matrix Plot: How to Apply color function to only a region of the plot

I want to make a matrix plot where a color function is applied to a region of a matrix. Those matrix elements which were not in the region specified should not have any color associated with them, and ...
3
votes
2answers
165 views

Draw and Quantity

I'd like to use Quantity in my graphics, but I can't figure out how to do it even for a very simple Circle. ...
3
votes
1answer
519 views

List Contour Plot: Delete some contour lines, but keep the colors

I'm trying to make a Contour plot of a set of data of the kind: $(x,y,f(x,y))$ What i'd like to do is to remove the majority of the iso-line and just leave two of them, but keeping the changing of ...
3
votes
2answers
247 views

Plot graphs together Using ListPlot

How can I plot two graphs together generated from ListPlot or ListLinePlot command, both t and s have the same number of elements. I thought Show would solve the problem however it does not, it just ...
3
votes
3answers
289 views

Point-like function but with diamond instead of circle

I would like to use something like Point[x,y] to plot diamonds instead of small circles ("points"). I'm creating charts from scratch inside a ...
3
votes
1answer
902 views

How to insert a zoom inside the main plot

As the title indicates, I want to add inside the main plot (preferably at the lower left part) a zoom. Here is the corresponding Mathematica code: ...
3
votes
2answers
421 views

Density plot for data with a wide dynamic range

I'm generating some figures for a paper. One of them has a pattern like the following figure: ...
3
votes
2answers
246 views

The same value of VertexSize for vertices in different graphs causes different vertices size

I generated some graphs. The smallest vertices in the 1st graph should be the same size as the smallest vertices in the second graph. The smallest vertices have the same size (...
3
votes
2answers
163 views

Filling a rectangle with an image

Say I have some rectangles of different sizes drawn on the screen. How can I fill them all with the same image? Ideally, the image would be resized to completely fill each rectangle. I've been trying ...
3
votes
2answers
205 views

generating randomly oriented non-intersecting cylinders

I could not find anything relevant with "googling" (only this) I can create a set of randomly oriented cylinders (code found here) ...
3
votes
2answers
84 views

Can I control the order of overlay in Filling?

The default ordering is "in the y direction". In this example I would like the red regions to overlay the blue regions. ...
3
votes
2answers
964 views

Positioning axes labels

I need to change the position of my axes labels such that the y-axis label is in the middle and parallel to the y-axis. I'd also like the x-axis label to be in the middle of the x-axis rather than ...
3
votes
2answers
175 views

How can one plot percentage chart of continuous functions?

I know you can plot percentages using stacked histograms like this: ...