Tag Info

Hot answers tagged

10

Here is a method to generate the ticks automatically based on the plot range. It uses FindDivisions to select "pleasing" values. eVticks = {1240/#, NumberForm[N@#, {2, 1}]} & /@ FindDivisions[1240/{##}, 8] &; ListPlot[{{500, 50}}, Frame -> True, PlotRange -> {{400, 800}, {-10, 110}}, FrameLabel -> {"Wavelength (nm)", "Intensity ...


9

If I understand you correctly, is the following what you want? correlations2 = Map[ Outer[Correlation, #, #, 1] &[Transpose[#]] &, partitionedData, {2}]; Now the Correlation receives two vector as its input, and you can replace it with SpearmanRankCorrelation or KendallRankCorrelation legally. To verify it, compare correlations2 with your ...


6

I would define my upper ticks so that it should be easy to change the number of decimal points if needed (thanks to Mr.Wizard for pointing out a mistake). upperTicks = Module[{labels, positions}, labels = Range[1240/400, 1240/800, -0.2]; positions = 1240/# & /@ labels; Transpose[{positions, labels}]]; upperTicksMinor = Module[{labels, positions, ...


6

As soon as I posted, I realized I could check whether there were any options for LinTicks that might be useful: Options@LinTicks // TableForm Scanning that list, I saw: TickLabelFunction -> Automatic On a hunch, I added TickLabelFunction -> TraditionalForm To the ticks definition from the question, and things worked:


4

The reason the OP's hack works is because Inset allows to place non-graphic objects in a graphics object. The reason it does not work is because Inset places the inset in the center of hosting graph by default. The package has a command to include non-graphics objects: ScaledLabel. The following function takes a legend plot pand returns the command to ...


4

I think the "easiest" way is to abandon the use of LevelScheme to position your legend. Instead, I would do something like this, legend = myplot /. Legended[_, Placed[l_, ___]|{Placed[l_, ___]}] :> l; Legended[ Figure[ (* fill in details *), Placed[ legend, placement ] ]


4

You appear to have an inefficiency in your algorithm. You generate a symmetrical correlation matrix and only use one element (correlations[[All, All, 1, 2]]). You also partition everything before processing which takes a lot of memory: ByteCount[partitionedData] 505899832 I suggest reformulating your code to produce only the significant correlation ...


2

Here's an example of how to do it with the SciDraw package, which is the successor of LevelScheme (you'll be able to re-use some of what you've learned about LevelScheme). I'm not experienced with the original LevelScheme so I won't attempt to use it now or comment on its capabilities. Needs["SciDraw`"] Figure[ FigurePanel[ { FigLine@Plot[Sin[x], ...


2

I would approach your problem, firstly by dropping all legends from your plots. As an example, your density plot would be redefined as myDensity = DensityPlot[Sin[x], {x, 0, 10}, {y, -1, 1}]; and I would define a bar legend using another density plot: lgDensity = DensityPlot[y, {x, 0, 1}, {y, -1, 1}, ColorFunction -> ColorData["LakeColors"] ...



Only top voted, non community-wiki answers of a minimum length are eligible