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
623 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
217 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
912 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
199 views

Create graphic object using {x,y} points, and plot a contour over it

I am trying to create a graphics object (polygon built with {x,y} points)so I can plot a contour over it. I would like the coordinates of the contour plot and graphics object be matched (ie, {0,0} in ...
3
votes
3answers
169 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
285 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
2k 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
244 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
127 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
625 views

Adding labels and numbers in axes

Let's see the following test case ...
3
votes
1answer
329 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
208 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
89 views

How to remove parts of a curve?

I have a curve that have some unwanted parts. How can I remove them ? Or how to constraint the curve to a specific region ? Here's a MWE that shows the problem : ...
3
votes
2answers
233 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
200 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
529 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
368 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
3answers
166 views

Collapsible Group of Control Objects

I did what I believe was a thorough search on this topic, but still ended up fruitless. Apologies if there is a trivial solution to this. Is there a way to group control objects together to form ...
3
votes
1answer
605 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
145 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
2k 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
459 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
158 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
215 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
118 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
101 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
239 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
122 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
149 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
128 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
96 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
227 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
1answer
623 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
286 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
312 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
1k 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
433 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
261 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
151 views

How to plot coordinates with different colors on a map?

How can I plot different sets of coordinates with different colors? For example, the two maps below would be merged into one map, with two colors. I'm using the commands below to create the maps ...
3
votes
2answers
84 views

how to draw the intersection when a function intersected by a plane

I'm sorry, this maybe a very basic question. $z=x^2+y^2$ that intersects a plane passing through the point (1, −1, 2), which is perpendicular to the xy-plane and parallel to the vector ...
3
votes
2answers
112 views

Rounded rectangle with color gradient [duplicate]

Basically I'd like to produce a graphic like this: That is a rectangle with rounded corners, filled with a color gradient. While Rectangle offers the ...
3
votes
2answers
203 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
93 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
2k 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
200 views

How can one plot percentage chart of continuous functions?

I know you can plot percentages using stacked histograms like this: ...
3
votes
2answers
231 views

Controlling spacing of histograms in Histogram3D

I have five histograms, hist1 = Histogram[data1, 20], to which I append {1, 2, 3, 4, 5} via ...
3
votes
2answers
231 views

Using high RasterSize or ImageResolution changes contour pattern

I found that the detailed contour pattern will be altered if we Rasterize the original graphics using high RasterSize or ...
3
votes
1answer
290 views

Shading area in graphics

I want to shade the area between the formula ...