Classes | |
class | Axes |
class | Curve |
class | CurveAxis |
class | Dots |
class | Ellipse |
class | Fig |
class | Frame |
class | Grid |
class | HGrid |
class | HLine |
class | Line |
class | LineAxis |
class | LineGlobal |
class | Path |
class | Plot |
class | Poly |
class | Rect |
class | SVG |
class | Text |
class | TextGlobal |
class | Ticks |
class | VGrid |
class | VLine |
class | XAxis |
class | XErrorBars |
class | YAxis |
class | YErrorBars |
Functions | |
def | attr_preprocess (attr) |
def | canvas (sub, attr) |
def | canvas_outline (sub, attr) |
def | funcRtoC (expr, var="t", globals=None, locals=None) |
def | funcRtoR (expr, var="x", globals=None, locals=None) |
def | funcRtoR2 (expr, var="t", globals=None, locals=None) |
def | load (fileName) |
def | load_stream (stream) |
def | make_marker (id, shape, attr) |
def | make_symbol (id, shape="dot", attr) |
def | pathtoPath (svg) |
def | rgb (r, g, b, maximum=1.) |
def | rotate (angle, cx=0, cy=0) |
def | template (fileName, svg, replaceme="REPLACEME") |
def | totrans (expr, vars=("x", "y"), globals=None, locals=None) |
def | unumber (x) |
def | window (xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True) |
Variables | |
dictionary | _canvas_defaults |
def | _circular_dot = make_symbol("circular_dot") |
_default_directory | |
string | _default_fileName = "tmp.svg" |
int | _epsilon = 1e-5 |
dictionary | _hacks = {} |
dictionary | _marker_templates |
dictionary | _symbol_templates |
all_whitespace | |
output | |
stack | |
def svgfig.attr_preprocess | ( | attr | ) |
def svgfig.canvas | ( | sub, | |
attr | |||
) |
Creates a top-level SVG object, allowing the user to control the image size and aspect ratio. canvas(sub, sub, sub..., attribute=value) sub optional list nested SVG elements or text/Unicode attribute=value pairs optional keywords SVG attributes Default attribute values: width "400px" height "400px" viewBox "0 0 100 100" xmlns "http://www.w3.org/2000/svg" xmlns:xlink "http://www.w3.org/1999/xlink" version "1.1" style "stroke:black; fill:none; stroke-width:0.5pt; stroke-linejoin:round; text-anchor:middle" font-family "Helvetica,Arial,FreeSans?,Sans,sans,sans-serif"
Definition at line 482 of file svgfig.py.
Referenced by DMRChecker.adjustCanvases(), canvas_outline(), DD4hep_TrackingMaterialPlotter.draw(), TrackingMaterialPlotter.draw(), HcalObjRepresent::ADataRepr.draw(), Phase1PixelROCMaps.drawBarrelMaps(), EcalDisplaysByEvent.drawCanvas(), DTOccupancyClusterBuilder.drawClusters(), Phase1PixelROCMaps.drawForwardMaps(), ErrorsAnalyzer.drawHistograms(), ErrorsPropagationAnalyzer.drawHistograms(), SiStripTkMaps.drawMap(), Phase1PixelROCMaps.drawMaps(), TauDQMHistPlotter.endRun(), AlignmentPayloadInfo< PayloadType >.fill(), DAQMappingPayloadInfo< PayloadType >.fill(), templateHelper::SiPixelTitles_Display< PayloadType, StoreType, TransientType >.fill(), PfCalibration< T >.fill(), ParametersPerChannel< param, PayloadType >.fill(), AlignPCLThresholdPlotHelper::AlignPCLThresholds_DisplayBase< PayloadType >.fill(), templateHelper::SiPixelHeaderTable< PayloadType, StoreType, TransientType >.fill(), JME::JetResolutionSummary.fill(), AlignPCLThresholdPlotHelper::AlignPCLThresholds_CompareBase< PayloadType, nIOVs, ntags >.fill(), gainCalibHelper::SiPixelGainCalibrationValues< myType, PayloadType >.fill(), JME::JetResolutionCompare.fill(), beamSpotPI::DisplayParameters< PayloadType >.fill(), templateHelper::SiPixelIDs< PayloadType, myType >.fill(), gainCalibHelper::SiPixelGainCalibrationValuesPerRegion< isBarrel, myType, PayloadType >.fill(), templateHelper::SiPixelFullPixelIDMap< PayloadType, StoreType, TransientType >.fill(), gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion< isBarrel, myType, nIOVs, ntags, PayloadType >.fill(), beamSpotPI::DisplayParametersDiff< PayloadType, nIOVs, ntags >.fill(), templateHelper::SiPixelTemplateHeaderInfo< PayloadType, StoreType, TransientType, myType, myParam >.fill(), JME::JetScaleFactorSummary.fill(), gainCalibHelper::SiPixelGainCalibrationCorrelations< PayloadType >.fill(), JME::JetScaleFactorCompare.fill(), simBeamSpotPI::DisplayParameters< PayloadType >.fill(), gainCalibHelper::SiPixelGainCalibrationValuesByPart< myType, PayloadType >.fill(), simBeamSpotPI::DisplayParametersDiff< PayloadType, nIOVs, ntags >.fill(), gainCalibHelper::SiPixelGainCalibrationValueComparisonBase< myType, PayloadType >.fill(), gainCalibHelper::SiPixelGainCalibDiffAndRatioBase< myType, nIOVs, ntags, PayloadType >.fill(), simBeamSpotHLLHCPI::DisplayParameters< PayloadType >.fill(), simBeamSpotHLLHCPI::DisplayParametersDiff< PayloadType, nIOVs, ntags >.fill(), gainCalibHelper::SiPixelGainCalibrationMap< myType, PayloadType, myDetType >.fill(), gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase< myType, PayloadType, nIOVs, ntags >.fill(), SiStripCondObjectRepresent::SiStripDataContainer< Item, type >.fillByPartition(), HcalObjRepresent::HcalDataContainer< Items, Item >.FillCanv(), SiStripCondObjectRepresent::SiStripDataContainer< Item, type >.fillCorrelationByPartition(), SiStripCondObjectRepresent::SiStripDataContainer< Item, type >.fillSummary(), SiStripCondObjectRepresent::SiStripDataContainer< Item, type >.fillValuePlot(), EcalDisplaysByEvent.init2DEcalCanvas(), main(), SiStripHistoPlotter.makeCondDBPlots(), TagProbeFitter.makeEfficiencyPlot1D(), TagProbeFitter.makeEfficiencyPlot2D(), SiStripHistoPlotter.makePlot(), MuScleFitUtils.minimizeLikelihood(), DBoxMetadataHelper::DBMetaDataPlotDisplay.plotDiffWithMetadata(), L1TUtmTriggerMenuInspectorHelper::L1TUtmTriggerMenuDisplay< T >.plotDiffWithOtherMenu(), DBoxMetadataHelper::DBMetaDataPlotDisplay.plotMetaDatas(), root.plotTF1(), PFTauRenderPlugin.preDraw(), RecoBTag.PrintCanvasHistos(), Phase1PixelSummaryMap.printTrackerMap(), DD4hep_ListGroups.produceAndSaveSummaryPlot(), ListGroups.produceAndSaveSummaryPlot(), SoftLeptonTagPlotter.psPlot(), TrackCountingTagPlotter.psPlot(), TrackProbabilityTagPlotter.psPlot(), IPTagPlotter< Container, Base >.psPlot(), JetTagPlotter.psPlot(), TagProbeFitter.saveDistributionsPlot(), TagProbeFitter.saveFitPlot(), PatternOptimizerBase.savePatternsInRoot(), DD4hep_MaterialAccountingGroup.savePlot(), MaterialAccountingGroup.savePlot(), svgfig.SVG.standalone_xml(), tfwliteselectortest::ThingsTSelector.terminate(), tfwliteselectortest::ThingsTSelector2.terminate(), __class__< T >.terminate(), HFunctionResolution.Write(), HCovarianceVSxy.Write(), PPSAlignmentHarvester.writeCutPlot(), TestCorrection.~TestCorrection(), and TestResolution.~TestResolution().
def svgfig.canvas_outline | ( | sub, | |
attr | |||
) |
Same as canvas(), but draws an outline around the drawable area, so that you know how close your image is to the edges.
Definition at line 510 of file svgfig.py.
References canvas(), and nano_mu_digi_cff.float.
Converts a complex "z(t)" string to a function acceptable for Curve. expr required string in the form "z(t)" var default="t" name of the independent variable globals default=None dict of global variables used in the expression; you may want to use Python's builtin globals() locals default=None dict of local variables
Definition at line 1452 of file svgfig.py.
References submitPVValidationJobs.split().
Converts a "f(x)" string to a function acceptable for Curve. expr required string in the form "f(x)" var default="x" name of the independent variable globals default=None dict of global variables used in the expression; you may want to use Python's builtin globals() locals default=None dict of local variables
Definition at line 1484 of file svgfig.py.
Converts a "f(t), g(t)" string to a function acceptable for Curve. expr required string in the form "f(t), g(t)" var default="t" name of the independent variable globals default=None dict of global variables used in the expression; you may want to use Python's builtin globals() locals default=None dict of local variables
Definition at line 1469 of file svgfig.py.
Referenced by svgfig.Curve.Path().
def svgfig.load | ( | fileName | ) |
Loads an SVG image from a file.
Definition at line 547 of file svgfig.py.
References geometryDiff.file, and load_stream().
Referenced by amc13::Packet.add(), DTWorkflow.DTWorkflow.add_preselection(), DAQSource.checkNext(), l1t::MP7BufferDumpToRaw.formatAMC(), FWPartialConfigLoadGUI.FWPartialConfigLoadGUI(), evf::EvFDaqDirector.initRun(), FedRawDataInputSource.nextEvent(), l1t::stage1::CaloSpareHFPacker.pack(), l1t::stage2::GlobalExtBlkPacker.pack(), l1t::stage1::HFRingPacker.pack(), l1t::stage1::MissEtPacker.pack(), l1t::stage1::MissHtPacker.pack(), l1t::stage1::EtSumPacker.pack(), l1t::stage1::RCTEmRegionPacker.pack(), l1t::stage2::CaloTowerPacker.pack(), l1t::stage2::GlobalAlgBlkPacker.pack(), l1t::stage2::ZDCPacker.pack(), l1t::stage2::EtSumPacker.pack(), l1t::stage2::CaloLayer1Packer.pack(), amc::Packet.Packet(), dqmservices::DQMStreamerReader.prepareNextFile(), process(), l1t::L1TDigiToRaw.produce(), L1MuBMExtrapolationUnit.run(), L1MuDTExtrapolationUnit.run(), utils.unpickler.run(), template(), and evf::GlobalEvFOutputEventWriter.throttledCheck().
def svgfig.load_stream | ( | stream | ) |
Loads an SVG image from a stream (can be a string or a file object).
Definition at line 551 of file svgfig.py.
References submitPVValidationJobs.__init__().
Referenced by load().
def svgfig.make_marker | ( | id, | |
shape, | |||
attr | |||
) |
Creates a new instance of an SVG marker to avoid cross-linking objects. id required a new identifier (string/Unicode) shape required the shape name from _marker_templates attribute=value list keyword list modify the SVG attributes of the new marker
Definition at line 1965 of file svgfig.py.
References attr_preprocess().
Referenced by svgfig.Line.SVG(), and svgfig.LineGlobal.SVG().
def svgfig.make_symbol | ( | id, | |
shape = "dot" , |
|||
attr | |||
) |
Creates a new instance of an SVG symbol to avoid cross-linking objects. id required a new identifier (string/Unicode) shape default="dot" the shape name from _symbol_templates attribute=value list keyword list modify the SVG attributes of the new symbol
Definition at line 1894 of file svgfig.py.
References attr_preprocess().
def svgfig.pathtoPath | ( | svg | ) |
Converts SVG("path", d="...") into Path(d=[...]).
Definition at line 1007 of file svgfig.py.
References str.
Referenced by geometryDiffVisualization.draw_disk().
def svgfig.rgb | ( | r, | |
g, | |||
b, | |||
maximum = 1. |
|||
) |
Create an SVG color string "#xxyyzz" from r, g, and b. r,g,b = 0 is black and r,g,b = maximum is white.
Definition at line 40 of file svgfig.py.
References SiStripPI.max, and SiStripPI.min.
Referenced by cert_plot(), geometryDiffVisualization.csc_colors(), geometryDiffVisualization.dt_colors(), and RunInfoPI.reportSummaryMapPalette().
def svgfig.rotate | ( | angle, | |
cx = 0 , |
|||
cy = 0 |
|||
) |
Creates and returns a coordinate transformation which rotates around (cx,cy) by "angle" degrees.
Definition at line 705 of file svgfig.py.
Referenced by magneticfield::bLayer.bLayer(), magneticfield::MagGeoBuilder.build(), MagGeoBuilderFromDDD.build(), SurveyPxbDicer.doDice(), CmsTrackerPhase2TPDiskBuilder< FilteredView >.PhiPosNegSplit_innerOuter(), and CmsTrackerPhase1DiskBuilder< FilteredView >.PhiPosNegSplit_innerOuter().
def svgfig.template | ( | fileName, | |
svg, | |||
replaceme = "REPLACEME" |
|||
) |
Loads an SVG image from a file, replacing instances of <REPLACEME /> with a given svg object. fileName required name of the template SVG svg required SVG object for replacement replaceme default="REPLACEME" fake SVG element to be replaced by the given object >>> print load("template.svg") None <svg (2 sub) style=u'stroke:black; fill:none; stroke-width:0.5pt; stroke-linejoi [0] <rect height=u'100' width=u'100' stroke=u'none' y=u'0' x=u'0' fill=u'yellow' [1] <REPLACEME /> >>> >>> print template("template.svg", SVG("circle", cx=50, cy=50, r=30)) None <svg (2 sub) style=u'stroke:black; fill:none; stroke-width:0.5pt; stroke-linejoi [0] <rect height=u'100' width=u'100' stroke=u'none' y=u'0' x=u'0' fill=u'yellow' [1] <circle cy=50 cx=50 r=30 />
Definition at line 521 of file svgfig.py.
References load().
Referenced by CAHitNtupletGeneratorKernelsCPU< TrackerTraits >.allocateOnGPU(), ALPAKA_ACCELERATOR_NAMESPACE::CAHitNtupletGeneratorKernels< TTTraits >.classifyTuples(), dd_error_scan(), nnet.dense(), ALPAKA_ACCELERATOR_NAMESPACE::ProducerBase< BaseT, Args >.deviceProduces(), GenericMVAComputer.eval(), cms::alpakatools.fillManyFromVector(), reco::modules::ParameterAdapter< S >.fillPSetDescription(), findNameSpaces(), edm::eventsetup::DependentRecordImplementation< EcalMappingRcd, edm::mpl::Vector< EcalMappingElectronicsRcd > >.get(), edm::eventsetup::DependentRecordImplementation< EcalMappingRcd, edm::mpl::Vector< EcalMappingElectronicsRcd > >.getHandle(), edm::eventsetup::DependentRecordImplementation< EcalMappingRcd, edm::mpl::Vector< EcalMappingElectronicsRcd > >.getRecord(), edm::refitem::GetRefPtrImpl< C, T, F, KEY >.getRefPtr_(), edm::refitem::GetRefPtrImpl< C, T, F, unsigned int >.getRefPtr_(), edm::eventsetup::DependentRecordImplementation< EcalMappingRcd, edm::mpl::Vector< EcalMappingElectronicsRcd > >.getTransientHandle(), HeterogeneousSoAImpl< T, Traits >.HeterogeneousSoAImpl(), ALPAKA_ACCELERATOR_NAMESPACE::CAHitNtupletGeneratorKernels< TTTraits >.launchKernels(), edm::WorkerMaker< T >.makeModule(), edm::RefProd< Phase2TrackerCluster1Ds >.operator*(), edm::RefProd< Phase2TrackerCluster1Ds >.operator->(), PixelTrackProducerFromSoAAlpaka< TrackerTraits >.produce(), PixelTrackProducerFromSoAT< TrackerTraits >.produce(), ALPAKA_ACCELERATOR_NAMESPACE::ProducerBase< BaseT, Args >.produces(), and edm::eventsetup::DependentRecordImplementation< EcalMappingRcd, edm::mpl::Vector< EcalMappingElectronicsRcd > >.tryToGetRecord().
Converts to a coordinate transformation (a function that accepts two arguments and returns two values). expr required a string expression or a function of two real or one complex value vars default=("x", "y") independent variable names; a singleton ("z",) is interpreted as complex globals default=None dict of global variables locals default=None dict of local variables
Definition at line 598 of file svgfig.py.
References electrons_cff.expr, and submitPVValidationJobs.split().
Referenced by svgfig.Ticks.orient_tickmark(), svgfig.Curve.Path(), svgfig.Poly.Path(), svgfig.Fig.SVG(), svgfig.Plot.SVG(), svgfig.Path.SVG(), svgfig.Text.SVG(), svgfig.Dots.SVG(), svgfig.LineGlobal.SVG(), svgfig.Ticks.SVG(), svgfig.XErrorBars.SVG(), and svgfig.YErrorBars.SVG().
def svgfig.unumber | ( | x | ) |
Converts numbers to a Unicode string, taking advantage of special Unicode characters to make nice minus signs and scientific notation.
Definition at line 2284 of file svgfig.py.
References betterConfigParser.unicode.
def svgfig.window | ( | xmin, | |
xmax, | |||
ymin, | |||
ymax, | |||
x = 0 , |
|||
y = 0 , |
|||
width = 100 , |
|||
height = 100 , |
|||
xlogbase = None , |
|||
ylogbase = None , |
|||
minusInfinity = -1000 , |
|||
flipx = False , |
|||
flipy = True |
|||
) |
Creates and returns a coordinate transformation (a function that accepts two arguments and returns two values) that transforms from (xmin, ymin), (xmax, ymax) to (x, y), (x + width, y + height). xlogbase, ylogbase default=None, None if a number, transform logarithmically with given base minusInfinity default=-1000 what to return if log(0 or negative) is attempted flipx default=False if true, reverse the direction of x flipy default=True if true, reverse the direction of y (When composing windows, be sure to set flipy=False.)
Definition at line 643 of file svgfig.py.
Referenced by edm::storage::LocalCacheFile.cache(), CTPPSDiamondDQMSource::ChannelPlots.ChannelPlots(), CSCStripElectronicsSim.channelsToRead(), l1t::ConditionEvaluation.checkRangeEta(), l1t::ConditionEvaluation.checkRangeTfMuonIndex(), tt::Setup.consumeStubAlgorithm(), TTStubAlgorithm_official< T >.degradeBend(), reco::EcalClustersGraph.dynamicWindow(), tt::Setup.encodeBend(), FWLayoutBuilder.FWLayoutBuilder(), trklet::TrackletLUT.getBendCut(), PixelForwardLayer.groupedCompatibleDetsV(), PixelForwardLayerPhase1.groupedCompatibleDetsV(), TBLayer.groupedCompatibleDetsV(), CompositeTECWedge.groupedCompatibleDetsV(), TIBRing.groupedCompatibleDetsV(), TOBRod.groupedCompatibleDetsV(), PixelBlade.groupedCompatibleDetsV(), Phase1PixelBlade.groupedCompatibleDetsV(), Phase2OTBarrelRod.groupedCompatibleDetsV(), CompositeTECPetal.groupedCompatibleDetsV(), AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D.MuonSystemMapPlot1D(), TIBLayer.overlap(), PixelBlade.overlap(), Phase1PixelBlade.overlap(), l1t::TriggerMenuParser.parseCalo(), l1t::TriggerMenuParser.parseCaloCorr(), TTStubAlgorithm_official< T >.PatternHitCorrelation(), MuonResidualsFitter.plotsimple(), MuonResidualsFitter.plotweighted(), CTPPSDiamondDQMSource::PotPlots.PotPlots(), MuonTemplate.print(), TIBLayer.searchNeighbors(), CompositeTECWedge.searchNeighbors(), TECLayer.searchNeighbors(), Phase2EndcapSingleRing.searchNeighbors(), TIDRing.searchNeighbors(), Phase2EndcapRing.searchNeighbors(), TOBRod.searchNeighbors(), TBPLayer.searchNeighbors(), PixelBlade.searchNeighbors(), Phase2OTBarrelRod.searchNeighbors(), Phase1PixelBlade.searchNeighbors(), CompositeTECPetal.searchNeighbors(), and tmtt::DegradeBend.work().
|
private |
|
private |
|
private |
|
private |
|
private |
svgfig.stack |
Definition at line 559 of file svgfig.py.
Referenced by trackerTFP::KalmanFilter.addLayer(), VectorHitBuilderAlgorithm.buildVectorHit(), VectorHitBuilderAlgorithm.buildVectorHits(), NamedCandCombinerBase.combine(), CandCombinerBase< OutputCollection, Cloner::CandPtr >.combine(), trackerTFP::HoughTransform.fillIn(), trackerDTC::DTC.merge(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_find_ntuplets< TrackerTraits >.operator()(), trackerTFP::GeometricProcessor.produce(), trklet::KFin.produce(), trklet::DRin.produce(), setStack(), TauDQMHistPlotter.TauDQMHistPlotter(), and FWPSetTableManager.updateFilter().