0
$\begingroup$

I have a 9 x 8 matrix containing values 0, 1, 2 and 3. I want to plot the region of matrix with value 3 with my parameters x -> {0, 0. 4} and y -> {0, 200}.

$\endgroup$

closed as unclear what you're asking by user64494, MarcoB, Alex Trounev, David G. Stork, bbgodfrey Jun 23 at 2:33

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Would you please make clear what your "parameters" are supposed to mean? $\endgroup$ – Henrik Schumacher Jun 17 at 11:12
  • $\begingroup$ I have solved basically 8 non linear equations by varying 2 parameters and stored the number of solutions in this matrix. I want to plot the region of my parameters where number of solution are 3. $\endgroup$ – Sushmita Pal Jun 17 at 12:22
  • $\begingroup$ And the parameter x has changed gradually from 0 to 0.4 and y has changed from 0 to 200? $\endgroup$ – Henrik Schumacher Jun 17 at 13:30
  • $\begingroup$ yes. I did try the code given by you but the plots are really thin. $\endgroup$ – Sushmita Pal Jun 17 at 13:41
  • $\begingroup$ Have another look. I added how to use AspectRatio. $\endgroup$ – Henrik Schumacher Jun 17 at 13:48
3
$\begingroup$

If A is your matrix, you should try

MatrixPlot[1 - Unitize[A - 3]]

ArrayPlot is another alternative. You may find also the DataRange option of MatrixPlot and ArrayPlot interesting. For example (with reasonable AspectRation):

MatrixPlot[1 - Unitize[A - 3], DataRange -> {{0, 0.4}, {0, 200}}, AspectRatio -> 1]

plots the matrix scaled to the aspect ration 300/0.4. Of course, that won't be very helpful as the resulting plot is very thin.

To obtain a MeshRegion, you may also use

ArrayMesh[1 - Unitize[A - 3], DataRange -> {{0, 0.4}, {0, 200}}]
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.