# Are PlotLegend and axis labeling supported for Wolfram|Alpha?

GROUPS:
 How would I add PlotLegends, axis labels, etc. to a plot generated using Wolfram|Alpha? For instance, the following simple command generates three lines: plot [y/324, y/275, y/221 for y=200 to 1000 ] I would like to label the first "oil", the second "propane" and the third "gas" instead of having the default legends shown below. Also, I'd like to label the y and x axis...I'm new to Wolfram|Alpha and haven't been able to find any real documentation on what is supported. Can you provide a link? General Mathematica documentation seems of limited utility.
2 years ago
3 Replies
 Assuming you have Mathematica you could use this rather hackish solution: Show[ReleaseHold[ WolframAlpha[ "plot [y/324, y/275, y/221 for y=200 to 1000 ]", {{"Plot", 1}, "Input"}]], AxesLabel -> {HoldForm["x axis!"], HoldForm["y axis!"]}, PlotLabel -> HoldForm["Awesome title!"]] In that I'm querying Alpha for the Mathematica expression necessary to create the plot it displays, and Show[]ing it with the options we want. You can add any Plot options you want.There's probably an easier way to do this, but this was the first I found.Although I'm a little confused as to why you can't just do Plot[{y/324, y/275, y/221}, {y, 200, 1000}]...
2 years ago
 Jesse, I don't have Mathematica. Also, the image you included seems to be from a local drive. The commands you suggested don't work when I try them.Do you have any other ideas for adding legends or axis labels in Wolfram|Alpha?
 Marco Thiel 1 Vote Dear Bob,I could't immediately make it work on Wolfram Alpha. But if you need the figure the following could work. You sign up for a free (!) account for the Wolfram Programming Cloud:It runs the Wolfram Language and you can achieve what you want by opening a new notebook and typing: Plot[{y/324, y/275, y/221}, {y, 200, 1000},PlotLegends -> {"Oil", "Propane", "Gas"},Frame-> True] You should see something like thisThe Wolfram Cloud is more powerful than Wolfram Alpha alone - it can make W|A requests. You get a whole lot of functionality for free. It gives you a great deal of flexibility of how to format the output.Cheers,Marco
 Marco Thiel 1 Vote Hi Bob,would this work for you? Plot[{y/324, y/275, y/221}, {y, 200, 1000}, PlotLegends -> {"Oil", "Propane", "Gas"}, Frame -> True, FrameLabel -> {"x-Axis", "y-Axis"}, LabelStyle -> Directive[Bold, 15],RotateLabel-> False] Actually the RotateLabel function should not be necessary, but the labelling of the y-axis overlapped with the figure without it. I suppose that's a minor glitch in the Cloud.Cheers,Marco Marco