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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Colors on contour plots showing wrong.

panos.roussos
1-Newbie

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

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

View solution in original post

35 REPLIES 35

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

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.

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

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

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

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

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?

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.

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

I had same bug in Mathcad Prime 2.0 and 3.0 versions, tested on WinXP SP3 32-bit with 3Gb of RAM. Never seen this error before. Sent this error for technical support.

Pic_1.PNG

Pic_2.PNG

Thanks for verifying and confirming that error. Seems to relate to Win XP only.

I also never experienced that kind of error before.

May it have to do with a recent Windows update? After all there was Microsoft patchday last Tuesday. Just an idea.

Later, I'll try to repeat it in Win7 32-bit and provide feedback.

Good idea, I just had the opportunity to test with Win7 64 bit and all was OK.

I have the same error in Win7 32-bit with 2Gb of RAM.

So it seems to be a 32-bit only error.

Any idea whats so different and special in this sheet?

You will let us know what technical support comes up with!?

Werner Exinger wrote:

... Any idea whats so different and special in this sheet? ...

No.

Werner Exinger wrote:

...You will let us know what technical support comes up with!? ...

Yes, of course.

Vladimir, I was able to track down the error and created the attached sheet to demonstrate. Maybe helpful in communication with PTC technical support.

The sheet is in Prime2 format, but the error is thrown likewise in Prime3.

Maybe other people with different hardware/software can report if the error shows up for them.

So far the error showed up with both Prime2 and Prime 3 with

  • 32bit, WinXP, 1-2GB RAM
  • 32bit, Win7, 2GB RAM

It did not show with

  • 64bit, Win7, 4GB RAM

PrimeError.png

P.S.: I know I could have used the new clear() command to redim a and b.

Werner,

I reproduce this error in Prime 3.0 (Win7, 2Gb of RAM) and sent it to PTC's technical support.

VladimirN. wrote:

Werner,

I reproduce this error in Prime 3.0 (Win7, 2Gb of RAM) and sent it to PTC's technical support.

Hmm, its the very same error you already reported - I just tracked it down to show where the real problem occurs.

Here is a quote from technical support: "... we have an issue on 32 bit systems caused by an Intel compiler problem".

VladimirN. wrote:

Here is a quote from technical support: "... we have an issue on 32 bit systems caused by an Intel compiler problem".

Ah - that sounds reasonable and fits the errormessage we are experiencing.

Werner Exinger wrote:

... So it seems to be a 32-bit only error ...

Yes.

Werner Exinger wrote:

... You will let us know what technical support comes up with!?...

Now the status of this case has the form "SPR Filed / Waiting on R&D" (quote: "we have an issue on 32 bit systems caused by an Intel compiler problem").

Message was edited.

tietjee
14-Alexandrite
(To:panos.roussos)

The one question asked, but to get ignorred was labeling x-y axis. Currently, it is not possible. This request has been maded multiple times, but no action from PTC. Seems they do not think it is important.

The one question asked, but to get ignorred was labeling x-y axis.

The question wasn't ignored but was answered in the very first reply.

tietjee
14-Alexandrite
(To:Werner_E)

I am hoping that PTC may finally get the message. They do not seem to be listening.

Sometimes when I prepare a picture from Mathcad for an article or a book I manual correct a counter plot in Paint for example.

Valery Ochkov wrote:

Sometimes when I prepare a picture from Mathcad for an article or a book I manual correct a counter plot in Paint for example.

Good idea but it shouldn't be necessary.

Unfortuneately quality plot never were a strength of Mathcad, not even in Mathcad 15 and below and to obtain publication quality plots you woul either have to export the Mathcad plots and finish them in another program, as you suggest, or export the data and redo the whole plot with another tool (Origin, or even Excel will do better sometimes).

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

Being curious I recreated the plot with MC 15 and here we don't have the wrong colors when plotting contour plots of matrices. We lack the color legend, though and would have to add it by creating a second plot underneath.

contour.png

Top Tags