Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.3K Views
|
7 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Min and Max file .xls

Posted 11 years ago
7 Replies

Thanks ! Works well but without "First@" !

Works well thank you ! But how do the limits of the legend ? It doesn't appear : /

graph3D = ListPlot3D[data = Import["myFile.xls"], ColorFunction -> "Rainbow", PlotLabel -> "3D", PlotLegends -> BarLegend[{"Rainbow", {Min[ToExpression[data]], Max[ToExpression[data]]}}]]

Things are much simpler! For the BarLegend you do not even need Min and Max, try:

txtData = { - your imported textdata - };
data = ToExpression[First@txtData];
graph3D = 
 ListPlot3D[data, ColorFunction -> "Rainbow", PlotLabel -> "3D", 
  PlotLegends -> Automatic]

Henrik

POSTED BY: Henrik Schachner

Depending on Mathematica version

   data = {{{"your data"}}};
    Max[ToExpression[data]]
    -24.34
    Min[ToExpression[data]]
    -56.82
Head[data[[1, 1, 1]]]
String

But this may not work in all instances as we don't know content of different xls files you may Import in the future.

POSTED BY: Hans Michel

... well, as one can see your imported data are all strings! Before any calculations can be done they have to be converted (using ToExpression):

txtData = { - your imported data - };
data = ToExpression[txtData];
MinMax[data]

Regards Henrik

POSTED BY: Henrik Schachner

same thing :/

Posted 11 years ago

Min[Flatten[data]]

POSTED BY: Imran Khan
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard