Wolfram言語

可視化:ラベル,スケール,除外

温度とサイズのプロット

次は,いくつかの元素の原子質量と融点を,値と関連単位の配列にしたものである.

In[1]:=
Click for copyable input
data = QuantityArray[DeleteMissing[EntityValue[\!\(\* NamespaceBox["LinguisticAssistant", DynamicModuleBox[{Typeset`query$$ = "elements", Typeset`boxes$$ = TemplateBox[{"\"elements\"", RowBox[{"EntityClass", "[", RowBox[{"\"Element\"", ",", "\"Elements\""}], "]"}], "\"EntityClass[\\\"Element\\\", \\\"Elements\\\"]\"", "\"elements\""}, "EntityClass"], Typeset`allassumptions$$ = {{ "type" -> "Clash", "word" -> "elements", "template" -> "Assuming \"${word}\" is ${desc1}. Use as \ ${desc2} instead", "count" -> "5", "Values" -> {{ "name" -> "ElementClass", "desc" -> "a class of elements", "input" -> "*C.elements-_*ElementClass-"}, { "name" -> "Book", "desc" -> "a book", "input" -> "*C.elements-_*Book-"}, { "name" -> "Periodical", "desc" -> "a periodical", "input" -> "*C.elements-_*Periodical-"}, { "name" -> "MathWorld", "desc" -> " referring to a mathematical definition", "input" -> "*C.elements-_*MathWorld-"}, { "name" -> "Word", "desc" -> "a word", "input" -> "*C.elements-_*Word-"}}}}, Typeset`assumptions$$ = {}, Typeset`open$$ = {1, 2}, Typeset`querystate$$ = { "Online" -> True, "Allowed" -> True, "mparse.jsp" -> 0.741312`6.321546023823575, "Messages" -> {}}}, DynamicBox[ToBoxes[ AlphaIntegration`LinguisticAssistantBoxes["", 4, Automatic, Dynamic[Typeset`query$$], Dynamic[Typeset`boxes$$], Dynamic[Typeset`allassumptions$$], Dynamic[Typeset`assumptions$$], Dynamic[Typeset`open$$], Dynamic[Typeset`querystate$$]], StandardForm], ImageSizeCache->{187., {7., 15.}}, TrackedSymbols:>{ Typeset`query$$, Typeset`boxes$$, Typeset`allassumptions$$, Typeset`assumptions$$, Typeset`open$$, Typeset`querystate$$}], DynamicModuleValues:>{}, UndoTrackedVariables:>{Typeset`open$$}], BaseStyle->{"Deploy"}, DeleteWithContents->True, Editable->False, SelectWithContents->True]\), {"AtomicMass", "MeltingPoint"}], 1, 1]]
Out[1]=

データをプロットし,軸に単位のラベルを付ける.

In[2]:=
Click for copyable input
ListPlot[data, PlotTheme -> "Detailed", FrameLabel -> Automatic, ImageSize -> 450]
Out[2]=

代りに,希望する単位であるアトグラムとケルビンでデータをプロットする.

In[3]:=
Click for copyable input
ListPlot[data, PlotTheme -> "Detailed", FrameLabel -> Automatic, ImageSize -> 450, TargetUnits -> {"Attograms", "Kelvin"}]
Out[3]=

関連する例

de en es fr ko pt-br ru zh