Message Boards Message Boards

ListContourPlot not plotting after after I export and import

Posted 11 years ago

Hi,

I am trying to save data into a csv/txt file and then import it later to plot it.

For some reason, after I export and import the data, my plots don't work anymore even though the data in the variables look exactly the same.

Does anyone have any suggestions?

Thanks!

POSTED BY: William Spitzer
2 Replies
Posted 11 years ago

I tried out your suggestion and for some reason it worked!

Thank you!

POSTED BY: William Spitzer
Posted 11 years ago

Without a concrete example of a notebook showing how the data was Exported and later Imported and the contents of the text file there is some guesswork in suggesting this.

Try evaluating FullForm[yourImportedData] and I suspect you will see the numbers you exported have been turned into strings after import. This can be because of Mathematica interpreting a .txt file as containing strings rather than numbers or it can be because of the way you are asking Import to interpret the data.

If it is all strings then you might try ToExpression[yourImporteData] and see if that is enough to turn it back into numbers.

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

Group Abstract Group Abstract