I want to have a PlotLegend in the top-right corner of the plot, but this option does not work.
How can I add PlotLegend into my Plot? Should I buy Mathematica 8?
u=Sech[x];
w=Cos[x];
v=Sin[x]^2;
Plot[{u,w,v},{x,-5,5},PlotStyle->{Automatic,Dashed,DotDashed},
PlotLegend->{"Sech[x]","Cos[x]","Sin[x]"}]
PlotLegend has always (at least since 2.2) been loaded through an add-on package.
Upgrade if you want, but loading legends using Needs["PlotLegends`"] should do the trick.
Related
We used to have an option "Always use Y-Up axis" toggle in Xcode (until Xcode 7 at least, I think).
It's gone in current Xcode 8.2.1, and probably gone since 8.1 or even 8.0. Why? Or is it hiding somewhere else? Any workarounds?
Update: I found a related quote from a WWDC speech, way back in 2014:
The way you add 3D assets to your game is just SceneKit asset
catalogs.
SceneKit asset catalogs are new feature in Xcode 6, SceneKit asset
catalogs are new feature in Xcode 6, and they allow you to organize
and optimize your 3D assets.
The structure of SceneKit asset catalogs is preserved when they are
copied into your target.
Also, they automatically track files that are added to them or removed
from them on disc.
They are really convenient because they can optimize your 3D assets
for you.
For instance, they help with up axis conversion.
SceneKit follows the up axis conversion, which means that the positive
y axis is the one that looks up.
This is a convention that is followed by many other applications and
frameworks, but some exporters do things differently and use a z up
axis convention.
With SceneKit asset catalogs, you don't have to think about that.
We automatically and transparently convert all the animations and
geometries in your scene so that they follow the up axis convention.
Taken from http://asciiwwdc.com/2014/sessions/610
Video at https://developer.apple.com/videos/play/wwdc2014/610/
The above seems to describe the scene kit asset catalog when it was introduced. It doesn't actually answer my question here; why that feature is removed from current Xcode. I can also confirm that no conversion happens behind the scenes. A model exported from Blender is always going to move closer to or away from camera if its Y position is changed. At run-time it is the same.
In Xcode 8, you can Ctrl-click on the .scnasset folder and Open As > SceneKit Catalog. If you make any changes, it will write out a Settings.json file. This may be what you are looking for.
I have a TChart in my Borland Delphi 7 project. What I want to do is to use an image instead of point while plotting on chart. How can I do this?
I'm not sure to understand what do you exactly want to achieve.
See the TImagePoint series. Find an example at "All features\Welcome !\Chart styles\Other\Image Point"
See the BackWall.Brush.Image property. Find an example at "All features\Welcome !\Miscellaneous\Walls\Back Wall\Brush image". Note you may have to set the back wall gradient invisible to make the image appear.
These examples are included in the TeeChart compiled demo
Currently our website department have a process where they manually radius the corners of each images to +4% to create "nicer" looking images for the web.
They currently do this using the radius function of Serif Photoplus, I was hoping people could think of a way to do this programmatically to a whole folder of images ideally using open source or free tools.
I'm aware we could do the radiusing with CSS, but I have yet to be convinced that there is an easy way to do this that is effective across all browsers and legacy browsers although I'm open to options in regard to this.
I think ImageMagick would be the right tool for the job.
This thread explains how to make rounded corners on images. It seems there are many ways to do this, this is why I listed no particular solution here. ImageMagick also has a batch function, with that you can apply the corner rounding to all the images in a directory.
ImageMagick is distributed under the Apache 2.0 license, so you can use it freely for commercial purposes.
You could do it by hand, creating a mask and then adding the images.
Example in Mathematica:
id = ImageDimensions;
ImageAdd[#,
Rasterize[
Graphics[Rectangle[{0, 0}, id##, RoundingRadius -> Max#id##/25],
PlotRange -> Transpose#{{0, 0}, id##}],
ImageSize -> id##]] &#
Import#"http://tutor-atlanta.com/wp-content/uploads/2010/11/test2.jpg"
How do you make Mathematica export a Row of graphics. I do not like how GraphicsRow handles the graphics, all the aspect ratios and paddings in the figures get messed up. What I like to do is work with each individual figure and then use a simple Row,Column or Grid to combine my figures. Take the following for instance:
g1 = Plot[Sin[x], {x, -Pi, Pi},
Frame -> True, FrameLabel -> {"x", "y"}, ImageSize -> 2.6*72
]
This creates the Sin plot. What I want to do now is create the following Figure:
Fig = Row[{g1, g1, g1}]
Then you can use Export
Export["TestFig.pdf", Fig]
This is the pdf I obtain in MMA8:
I just tried this code in MMA7 and it works fine. It had been a while since I wanted to create this type of figures and I never bothered to check if it worked in MMA8. Does any one have a fix for this in MMA8?
The desired output is the one I obtained in MMA7:
It is worth bearing in mind that GraphicsGrid assumes equal-width columns so using Grid is sometimes more useful. The same syntax as in belisarius' answer applies. It might be worth exploring the ImageSize option to Export (see documentation and tutorial).
Also, note the exporting in PDF format uses the PrintingStyleEnvironment, which is not how things look on screen. You might get better results if you change your page setup in Printing Settings.
Export["c:\\TestFig.pdf", GraphicsGrid[{{g1, g1, g1}}]]
The copy of Mathematica 8 I am using does not recognize the PlotLegend option for Plot and ListPlot. Specifically, it appears red when used.
A quick online search turns out nothing buggy/unusual, so I'm wondering what the problem is.
You didn't load the necessary package by any chance? That is, did you use:
Needs["PlotLegends`"]