Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.9K Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Jagged edges in ListDensityPlot[ ] output?

Posted 4 years ago
POSTED BY: sorabella91
3 Replies
POSTED BY: Gianluca Gorni
Posted 4 years ago

This actually does exactly what I'm looking for! While the values are applied to the colorfunction, it's really the Table itself that will be more useful for future calculations I plan on doing (the listdensityplot was a cool bonus feature). Yes I didn't use as many points just so the run time isn't excessively long for anyone wanting to see what the matrix looked like (pts 200 definitely looks great though I may actually need more for what I'm going to use this for)! Thank you very much for the help!

POSTED BY: sorabella91
Posted 4 years ago

The points outside the radius are complex and are ignored by ListDensityPlot. From the documentation

holes will be left in the plot whenever there are elements that are not real numbers

The jagged edges are caused by not having enough points. Try pts = 200.

You can replace the complex values with 0 like this, but that does not do what you want because the color function is applied to those values.

sReal = Replace[S, _Complex -> 0, 2]
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard