cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Colors on contour plots showing wrong.

SOLVED

Colors on contour plots showing wrong.

Hello all,

I am totally buffled by what I get on my contour plots.

I have attached the file. In the file I have also included a picture from the Excel contour plot which proves that the Mathcad plots are wrong.

Basically I have the 3 vectors defined as matrices, x, y ans z and I create the 3d matrix based on the procedure I came across on a similar plot related discussion thread of this forum.

The contour lines on the plot I create appear correct but the colours are plotted wrong. I think that the problem is that two different bands have the same colour(!) but should have different ones based on the legend underneath. This doesn't make any sense. Before I totally give up on this and continue my work in Excel I wanted to submit this question in the forum.

Also, a separate -less critical- question: is there any chance that I can have axis titles on my plots, instead of having to put text blocks all over...

Any help is appreciated,

Thanks,

Panos

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Colors on contour plots showing wrong.

As the way you constructed the matrices X and Y crashes Mathcad on some installations (see above: http://communities.ptc.com/message/226620#226620) I created X and Y in a different way an now no problems are experienced. Of course the colours Mathcad shows still are wrong.

I added a simple 2D linear interpolation of your data and now Mathcad is showing the colors as we had excpected (despite the fact the the colors chosen are somewhat unskilled, especially the different shades of cyan). Nevertheless the Excel result still is prettier ;-)

I would have thought that Mathcad would do that kind of interpolation itselft if told to plot the contours of a matrix rather than a function.

The attached file is in Prime2 format.

ContourPlot10kn_2.png

35 REPLIES 35

Re: Colors on contour plots showing wrong.

The highest z-value is 1825. You could try changing the upper limit in the band from 1900 to 1800.

Unfortunately when I tried to do this, Mahcad crashes (Prime3 as well as Prime2).

Also, a separate -less critical- question: is there any chance that I can have axis titles on my plots, instead of having to put text blocks all over...

Unfortunately not in Prime. The problem may be adressed in a future release we were told.

EDIT: In case anybody has an idea what the problem could be, the error message in a console window before/after the crash is:

OMP: Warning #2: Cannot open message catalog "3079\libiomp5ui.dll":

OMP: System error #126: Das angegebene Modul wurde nicht gefunden.

OMP: Info #3: Default messages are used.

OMP: Error #13: Assertion failure at z_Windows_NT_util.c(426).

OMP: Hint: Please submit a bug report with this message, compile and run command

s used, and machine configuration info including native compiler and operating s

ystem versions. Faster response will be obtained by including all program source

s. For information on submitting this issue, please see http://www.intel.com/sof

tware/products/support/.

Re: Colors on contour plots showing wrong.

Hi Werner, many thanks for your time.

I have already played around with the low and upper limit of the z-axis. I get all sorts of possible coombinations of the same error - contour lines correct & colours incorrect.

I haven't crashed it in any of those attempts so far. I have seen OMP related errors on other software applications and I think they are related to the number of processors that Mathcad may be employing for this (trying to execute commands in parallel). Other software have options to enable or disable this. If you can't disable it, try working on an older or super new machine.

Re: Colors on contour plots showing wrong.

If you can't disable it, try working on an older or super new machine.

It was a slow single core machine running under Win XP (so it was 32bit version of course). Don't think I will find an older one around ;-)

EDIT: YOur question reminded me on something but i couldn't remember what. Now I think I found it. The question as of seemingly wrong color mapping in Primes contour plots came up here before. At that time I guessed that the reason was that there were too few datapoints. Using some sort of interpolation helped but didn't cure it completely, I guess.

The thread is here: http://communities.ptc.com/message/203098#203098

Re: Colors on contour plots showing wrong.

Yeah, then just ignore my previous comment :-)

Yes, I had seen that post before I post mine and actually pulled out useful information from your posts - thanks. But I hadn't followed the discussion to the end. Interestingly enough, once again in that case, the contour lines appear correct again, but the colours do not seem to follow the legend. The fact that the contours (lines) are always correct is even more confusing.

I believe the data are dense enough, actually created in Excel with cubic spline interpolation in both 2 dimensions. The reason the data is so dense is because otherwise any basic data contour plot is showing poorly, and not because my end goal demands it. That said, it may be worth trying creating a nurbs response surface and getting new coordinates to feed Mathcad and see what happens. But if i do this, then actually I do not need Mathcad lol.

Anyhow, I will update this if I come up with a solution. Meanwhile, I have already progressed with Excel.

Cheers, Panos

Re: Colors on contour plots showing wrong.

I don't see an problem. When I force the plot to display the contour values, 1700 is yellow, 700 is slightly dark blue per the legend.

Contours.GIF

Re: Colors on contour plots showing wrong.

Werner Exinger wrote:

... In case anybody has an idea what the problem could be, the error message in a console window before/after the crash is:

OMP: Warning #2: Cannot open message catalog "3079\libiomp5ui.dll":

OMP: System error #126: Das angegebene Modul wurde nicht gefunden.

OMP: Info #3: Default messages are used.

OMP: Error #13: Assertion failure at z_Windows_NT_util.c(426).

OMP: Hint: Please submit a bug report with this message, compile and run command

s used, and machine configuration info including native compiler and operating s

ystem versions. Faster response will be obtained by including all program source

s. For information on submitting this issue, please see http://www.intel.com/sof

tware/products/support/.

Werner,

Do you experience this error in Prime 2.0 and Prime 3.0?

Highlighted

Re: Colors on contour plots showing wrong.

Hi! Thanks for answering. How can you not see any problem? If there is really no problem with the plot then I need an ophthalmologist. In any case I should be happy that my eyes are more compatible with what I produce in Excel.

contour+plot+problem+explain.PNG

contour+plot+Excel.PNG

Re: Colors on contour plots showing wrong.

Do you experience this error in Prime 2.0 and Prime 3.0?

Both. I already stated that in the second sentence of the post, although in paranthesis ;-)

It was an old machine, single core, 1 GB of RAM, Win XP (so 32 bit). Nevertheless I consider it a severe bug.

I usually hadn't experienced that kind of severe error, not even with much more complicated worksheets (also including contour plots, also with embedded pics) om the very same machine with Prime2&3 other than Prime being incredibly and inexcuseably SLOW.

So I am wondering whats so special with this worksheet?

I had no probs with it on a machine running Win7 and Prime2 64 bit.

Re: Colors on contour plots showing wrong.

I just reproduced the error with that very file with Prime3 on a different machine, more RAM but still single core and WinXP.