Skip to main content
1-Visitor
May 24, 2013
Question

Normalizing x,y axis of a Contour Plot

  • May 24, 2013
  • 2 replies
  • 9936 views

Hello Experts,

I have a request that hopefully is not difficult. I have a matrix One

When I plot One the x and y axis is defined by the indices of the Matrix One

I need the X and Y axis to be normalized from 0 to 1 and from -1 to 1

Can you help?

Thanks

Russ

2 replies

thiirane1-VisitorAuthor
1-Visitor
May 24, 2013

One additional comment.... I need the Matrix "One(x,y)" to be Normalized such that "One(m,n) such that m and n range from 0 to 1 and -1 to 1.

1-Visitor
May 24, 2013

if you want it to normalize, how do you want the point between [0,1] and [-1,1] looks like? is it a contiuous contour or you just want a discret point (1) in every corner and zero everywhere? Do you want it to change linearly? exponentially? or some other way? You need to be more specific.

thiirane1-VisitorAuthor
1-Visitor
May 24, 2013

Hi Henry,

Thanks for helping...

Rather than having a Matrix whose x and y coordinates are defined by its indices, I need the Matrix to have x and y coordinates defined by the mapping from 0 to 1 and -1 to 1.

This is an exercise in the creation of a fractal. I need to have to spatial distribution to be mapped to -1 to 1 See the bottom of the attached.

25-Diamond I
May 24, 2013

Would the two approches in the attached file help?

The first is to use with a 3D contour plot. As a mtrix can't have non integer indices I created a function f(Q,x,y) which uses the table as a lookup.

The second is for use in a normal 2D plot. A matrix is generated where the first colum represent the normalized x-, and the second the normalized y-values of all those elements in the original matrix with a value of 1.

Another approach would be to create a matrix which represents a bitmap, as was shown in this forum some times with different fractals. This approach would be extremely useful for colorful fractals like a mandelbrot, as you would have more control over color mapping, etc.